java - Layouting custom buttons -
i trying create buttons shaped in following picture:
this works pretty doing following:
class arrowbutton extends composite { arrowbutton(composite parent, int style) { [...] setregion(customregion); } } addstuff(composite parent) { arrowbutton b = new arrowbutton(parent, swt.none); b.setbounds(x, y, width, height); }
however, want use layout manager layout these buttons. ideally, buttons layouted on standard size, after can still paint outside of region.
is @ possible? how can this?
layout managers have 2 functions: calculating size of composite applied , setting bounds of composite's children. given relative simplicity of requirements (line buttons horizontally) i'd you're better off doing layout (rather trying hack existing implementation). can put code delegate behind layout interface, if feels better.
Comments
Post a Comment