java - Layouting custom buttons -


i trying create buttons shaped in following picture: powerpoint arrow buttons

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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -