java - SWT Label with horizontal line not showing correctly -
i'm trying display label in 2-columned gridlayout. can't seem make work display both text , horizontal line underneath:
public void foo(){ popupshell = new shell(display.getdefault(), swt.no_trim | swt.on_top | swt.modeless); //popupshell.setlayoutdata(new griddata(griddata.fill_horizontal)); popupshell.setlayout(createnomarginlayout(2, false)); label history = new label(popupshell, swt.separator | swt.shadow_out | swt.horizontal); history.settext("history"); history.setvisible(true); label fill = new label(popupshell, swt.none); fill.setsize(0,30); } public static gridlayout createnomarginlayout(int numcolumns, boolean makecolumnsequalwidth) { gridlayout layout = new gridlayout(numcolumns, makecolumnsequalwidth); layout.verticalspacing = 0; layout.horizontalspacing = 0; layout.margintop = 0; layout.marginbottom = 0; layout.marginleft = 0; layout.marginright = 0; layout.marginwidth = 0; layout.marginheight = 0; return layout; }
what i'm getting line no text.
what doing wrong?
a label
swt.separator
style not display text value. must use separate control display text.
from label
source, showing settext
ignored swt.separator
:
public void settext (string string) { checkwidget(); if (string == null) error (swt.error_null_argument); if ((style & swt.separator) != 0) return; ...
Comments
Post a Comment