View Single Post
Old 08-29-2011, 08:24 AM   #1 (permalink)
New Member
Join Date: Aug 2011
Model: 7100T
Carrier: Az
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Display problem overriding ButtonField

Please Login to Remove!


I have a problem overriding ButtonField. As the Field.USE_ALL_WIDTH flag doesn't work for ButtonField, I have to extend it.

I just override the layout method like this :

protected void layout(int width, int height) {
setExtent(width, getPreferredHeight());

I have several buttons in a VerticalFieldManager. My first button displays correctly, but others are empty (good size, but no text). I have to click the buttons to make the text appear.

Am I missing something ? The problem comes from the layout method I guess, because it's the only method I override.

Thanks !

Edit : Tested on JDE 4.7.0 and 6.0.0, same behaviour

Last edited by laurre : 08-29-2011 at 09:23 AM.
Offline   Reply With Quote