java - JavaFx dialog doesn't show all content text -
i have following dialog:
the last line shows part of text - text cut , instead of text "..." shown. how can make dialog show text?
edit 1
code
alert alert = new alert(alerttype.confirmation); alert.settitle("Выход из программы"); alert.setheadertext("Вы действительно хотите выйти из программы?"); alert.setcontenttext("Нажмите ОК для выхода. Для продолжения работы с программой нажмите Отмена."); optional<buttontype> result = alert.showandwait(); if (result.get() == buttontype.ok){ } else { }
edit 2 problem appears in linux (centos 7.1 , gnome 3). in windows 7 text shown @ 2 lines , ok.
edit 3
think it's linked height of dialog window. when alert.setresizable(true)
, increase height of window second line appears.
i didn't dig deeper reason, alternatively can set inner dialog pane's content instead:
alert.getdialogpane().setcontent( new label("твое содержание текста"));
edit:
maybe know how change text of cancel button?
you can lookup "cancel" button dialog pane:
button cancelbutton = ( button ) alert.getdialogpane().lookupbutton( buttontype.cancel ); cancelbutton.settext("oтмена");
Comments
Post a Comment