java - JavaFX Table Menu Button list shows text but not graphic -


i working on application uses tableview , has table menu button add or remove columns list.

since wanted column headers have tooltips, had no choice create label , use in following manner in :

// code here tablecolumn col; // code here col.setgraphic(header_title); 

the problem when program runs, table menu button shows list of empty text:

table menu button shows no text column titles

on other hand when do:

// code here tablecolumn col; // code here col.settext(rs.getstring("column_title")); col.setgraphic(header_title); 

i can see text on column menu, actual titles appended graphic:

column header text gets appended graphic

i have tried way perform setcontentdisplay(graphic_only), not seem exist tablecolumn, , not sure how access header node in order set setting.

any appreciated.

just forget inbuilt table menu button. it's absolutely minimal , not worth mentioning. if e. g. want click away 10 columns have click on button, hide column, click on button, hide column, etc. in other words: closes press menu item.

you can't extend e. g. hide , show button. , it's buggy: when last column gets hidden, menu button vanishes well, have restart application if want see in table again.

just create own table menu. there 2 examples on gist:

then can adapt whatever header want , whatever menu items want.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -