Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Administrator
MSohm
Posts: 14,313
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

ObjectChoiceField not getting aligned to right on OS 4.3 devices

Quote from previous forums:


Rocky

Posts: 20
Registered: Jan, 2008

ObjectChoiceField not getting aligned to right on OS 4.3 devices
Posted: Jun 23, 2008 7:06 PM
Reply
Hi,

Our users recently bought 8330 from Verizon. The problem they are facing is that choice fields are not getting aligned to right. The application works good on other simulators and devices. Is it 8330 OS 4.3 issue?

R -

 


Rocky

Posts: 20
Registered: Jan, 2008

Re: ObjectChoiceField not getting aligned to right on OS 4.3 devices
Posted: Jul 1, 2008 1:43 PM
Reply
Moderators any thought please?

 

msohm

Posts: 2,218
Registered: Jul, 2005

Re: ObjectChoiceField not getting aligned to right on OS 4.3 devices
Posted: Jul 1, 2008 2:39 PM
Reply
What is the BlackBerry handheld software version you are seeing this on? You can find this under Options, About on the BlackBerry.

Mark Sohm
BlackBerry Developer Journal
www.blackberrydeveloperjournal.com

 

Rocky

Posts: 20
Registered: Jan, 2008

Re: ObjectChoiceField not getting aligned to right on OS 4.3 devices
Posted: Jul 1, 2008 5:45 PM
Reply
OS version 4.3 and i just tested it on OS 4.5 simulator for 8330.

 

skicson

Posts: 44
From: Columbia, MD
Registered: Feb, 2008

Re: ObjectChoiceField not getting aligned to right on OS 4.3 devices
Posted: Jul 1, 2008 6:22 PM
Reply
This layout code works for me in 4.3 for an ObjectChoiceField:


HorizontalFieldManager hfm2 = new HorizontalFieldManager();
LabelField lf2 = new LabelField(Rm.GCCONVTYPE);

hfm2.add(lf2);
ocf = new ObjectChoiceField(){
protected void setSelectedIndex(int idx, int context){
super.setSelectedIndex(idx, context);
UiApplication.getUiApplication().invokeLater(new Runnable(){
public void run()
{
selectSet();
}
});


}
protected boolean trackwheelClick(int status,
int time)
{
this.invokeAction(Field.ACTION_INVOKE);
return true;

}

};
ocf.setChoices(mConversionSets);
hfm2.add(ocf);
add(hfm2);

 

 
Guest: Alan
Re: ObjectChoiceField not getting aligned to right on OS 4.3 devices
Posted: Jul 11, 2008 1:05 PM
Reply
I'm having the same problem too. I've wrote a simple test code to test on JDE 4.2.1, 4.3.0 and 4.5.0. It works ObjectChoiceField is properly aligning to the right in 4.2.1, however, on 4.3.0 and 4.5.0 it only aligns to the left even thought style is set to FIELD_RIGHT.

Any thoughts?


Here is my code:
public class TestScreen extends MainScreen
{
public TestScreen()
{
super();

FlowFieldManager bottomFM = new FlowFieldManager(USE_ALL_WIDTH);

String projectChoices[] = {"11th Street Painting", "12th Street Office", "1st Ave Restaurant"};
ObjectChoiceField projectDDF = new ObjectChoiceField("Project: ", projectChoices, 0, Field.FIELD_RIGHT | Field.USE_ALL_WIDTH | EDITABLE);
bottomFM.add(projectDDF);

this.add(bottomFM);
}
}

Thank you for posting the sample code, I was able to reproduce the issue and will direct it to our development team.  However, as a work around if you remove the Field.RIGHT style the field does take up the entire width.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.