05-08-2009 02:38 PM
I am developing an application for storm which has ObjectChoiceField on one of the screens but the native ObjectChoiceField seems to be too big in height that the text in it. i.e. it has some empty space in it above and below the text.Can any one plz tell i do i remove this empty space above and below the text or i do i reduce the height of the ObjectChoiceField. I tried to reduce by overiding the layout and also overiding the getPreferredHeight but none seems to work. Can any one help me with this?
05-08-2009 06:34 PM
If you are using JDE 4.7, then you are developing for the Storm, which is a touch screen device. It deliberately enlarges any Fields that it knows you are going to have to hit with your fingers - like Buttons and ChoiceFields. I would not want to reduce the size of the Field on the Storm.
Try using another JDE or OS Level, say 4.6 for the Bold, and see if the 'problem' is still there.
05-09-2009 12:38 AM
If i understood your problem what you want is to reduce the space in each row, just above and below the text.
You can do this using this
Please let me know if this solved your problem or not.
05-09-2009 07:56 AM - edited 05-09-2009 07:57 AM
@Rajat_10Sep - I think you are confusing a ChoiceField and a ListField, setRowHeight() is for ListFields.
Having said that, a similar thing does apply for ListFields. If you don't set a RowHeight, the 4.7 OS on a Storm will give you a larger row height with spacing than you will see on an earlier OS.
05-09-2009 08:02 AM
Sorry my mistake.
I read it ObjectListField instead of ObjectChoiceField.
05-10-2009 04:06 AM
Thx for ur replies. I tried with jde 4.6 there the height of the object choice field is fine. But i am developing for storm and am handling many touch events and this wont compile in jde 4.6 rt? as TouchEvent comes with o.s. 4.7 .So can anyone please tell me how do i reduce the height of objectchoiceField in storm?
05-10-2009 06:56 AM
Correct regarding touch Events - if you want to use them, it OS 4.7 and above.
However, before we start investigating ways of reducing the height, are you absolutely, 100% sure you want to do this. Have you actually tried it on a real device? I suspect that Rim made the Field the size they did for a reason, and if you have any other focusable fields near this one, then users may get frustrated trying to select the ChoiceField if it is too small.
Note that Rim also increases the size of Buttons and Checkboxs to make them fat finger friendly (as well as ListFields as already noted.
05-12-2009 02:12 PM
Actually the problem here is that the ObjectChoiceField is looking much bigger than all other components the screen. So it is appearing wierd. So just wanted to reduced its size somehow a bit.
05-12-2009 02:21 PM
Altering ChoiceFields can get tricky. If you are so inclined you can try handling the layout/painting yourself... otherwise you won't have much luck messing with the ChoiceFields on a Storm.
See this thread: