BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-13-2007, 04:38 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down GUI problem

Please Login to Remove!

I am very new to BB programming....and am facing problems with making the GUI .

i want to allign three radiobutton in one row..horizontally.....but am unable to figure out how.
pls can someone help me .
pls tell me there some resource on net which can help me the gui...something likea tutorial or somethig.

Thanks
Meenal
Omni-Bridge
Offline  
Old 02-13-2007, 05:58 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

BlackBerry - BlackBerry Developer Program | Support, Simulator & MDS Downloads, Knowledge Base & Community has lots of resources. The Application developers guides 1 and 2 are excellent, and cover most of the API
Offline  
Old 02-13-2007, 09:54 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks...but i have referred to those resources already.i have managed aligning them vertically...but not horizontally.Given bellow is code i have written.
Code:
package com.rim.samples.device.MY_GUI;

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.i18n.*;
import net.rim.device.api.system.*;
import net.rim.device.api.collection.util.*;
import net.rim.device.api.ui.Screen;

class GUI1 extends UiApplication {
    public static void main (String[] args ) throws Exception 
    {
        GUI1 gui = new GUI1();
        gui.enterEventDispatcher();
    }
    GUI1() throws Exception 
    {    
        pushScreen(new MainScreen1());
    }
}

final class MainScreen1 extends MainScreen 
{
    LabelField scr1;
    Screen1 scrR = new Screen1();
    //Screen scr;
    public MainScreen1() throws Exception
    {
        super(DEFAULT_MENU | DEFAULT_CLOSE);  
        scr1 = new LabelField("Hello World Title");
        setTitle(scr1);
        add(scrR.radio1());
    }
    public boolean onClose()
    {
        Dialog.alert("Bye World!");    
        System.exit(0);
           return true;
    }
}




package com.rim.samples.device.MY_GUI;

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.i18n.*;
import net.rim.device.api.system.*;
import net.rim.device.api.collection.util.*;
//import net.rim.device.api.ui.component.RadioButtonField.*;

public class Screen1 extends RadioButtonField {
        RadioButtonGroup rbg;
        RadioButtonField r1;
        RadioButtonField r2;
        RadioButtonField r3;    
   public Screen1() {  
    }
    
    public FlowFieldManager radio1() throws Exception {
        rbg  = new RadioButtonGroup();
        r1   = new RadioButtonField("All Calls",rbg,false);
        r2   = new RadioButtonField("Group",rbg,false);
        r3   = new RadioButtonField("Individual Calls",rbg,false);
        //rbg.add(r1);
        ////rbg.add(r2);
        //rbg.add(r3);
        int x = r1.getPreferredHeight();
        FlowFieldManager vfm = new FlowFieldManager(Manager.FIELD_HCENTER);
        vfm.add(r1);
        vfm.add(r2);
        vfm.add(r3);
        return vfm;
         }
}
could u suggest modification by which i can align them horizontally.

thanks
Meenal
Omni-Bridge
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.