eclipse - how to display label on composite in swt? -
i want display label on composite. added label can not see on display. code below:
gridlayout parentlayout = new gridlayout(1, true); parent.setlayout(parentlayout); composite filtercomposite = new composite(parent, swt.none); griddata filtercompositedata = new griddata(); filtercompositedata.verticalalignment = griddata.fill; filtercompositedata.horizontalspan = 2; filtercompositedata.grabexcesshorizontalspace = true; filtercompositedata.grabexcessverticalspace = true; filtercompositedata.horizontalalignment = griddata.fill; filtercomposite.setlayoutdata(filtercompositedata); label l1 = new label(filtercomposite, swt.none); text t1 = new text(filtercomposite, swt.none); l1.settext("xxxxxxxxxxx");
can show me way this?
you have not set layout on filtercomposite
- must set layout on every composite
Comments
Post a Comment