BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 10-21-2008, 12:00 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding Editable text field on the Dialog

Please Login to Remove!

Hi all,

Is there any way to add Editable text field on the Dialog.?
Please let me know if it is possible.

And how we can listen to the CheckboxField?
Offline  
Old 10-21-2008, 12:00 PM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any idea.
Offline  
Old 10-21-2008, 01:18 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 9000
PIN: N/A
Carrier: Rogers
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

For your first question, would you mind letting me see how you're going about displaying the Dialog; it'll give me a better idea of exactly what you're trying to achieve.

And to listen to a checkbox field you would do something like:

Code:
CheckboxField box = new CheckboxFiled("Listen to checkboxes", false);
box.setChangeListener( new FieldChangeListenter(){
      public void fieldChanged(Field f, int status){
              if(box.getChecked()){
                               
                  //perform action for when it is checked off

               } else {
                       //perform unchecked action
                }
            }

}
);
Offline  
Old 10-22-2008, 02:25 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

First of all thank you so much for your prompt response.
In my application i have created Persistent Object to store application data.
When user click the edit button i want to alert the user with the current row (data availabe on the row)of the ListField.And i want save and cancel button on the dialog.
Offline  
Old 10-22-2008, 02:31 AM   #5 (permalink)
Thumbs Must Hurt
 
Join Date: Nov 2007
Model: 8100
PIN: N/A
Carrier: vodafone
Posts: 61
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

for that you dont need for calling dialog alert...just create popscreen displays while you click menu item...
Offline  
Old 10-22-2008, 05:04 AM   #6 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

for a yes-no question you can use dialog.ask, you can also configure the text.
if it is more complex, you want an input field or a custom layout create the stuff as you want it displayed (in a manager) and create a popupscreen with the manager you just did.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 10-22-2008, 07:50 AM   #7 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi all,

I have strucked here, i am getting following compilation error,
cannot find symbol constructor PopupScreen() .

My code is as follows,

private class EditScreen extends PopupScreen implements FieldChangeListener
{
private ButtonField _save,_cancel;
private EditField _nameField;
private EditField _numField;
private VerticalFieldManager vm;
private HorizontalFieldManager hm;

public EditScreen(String _name,String _number)
{
_nameField =new EditField("Name: ","");
_nameField.setText(_name);
_numField =new EditField("Phone: ","",BasicEditField.DEFAULT_MAXCHARS, BasicEditField.FILTER_PHONE);
_numField.setText(_number);
hm =new HorizontalFieldManager();
vm =new VerticalFieldManager();
_save =new ButtonField("Save");
_cancel =new ButtonField("Cancel");
_save.setChangeListener(this);
_cancel.setChangeListener(this);
hm.add(_save);
hm.add(_cancel);
vm.add(_nameField);
vm.add(_numField);
vm.add(hm);
add(vm);
}
public void fieldChanged(Field field,int context)
{
if(field ==_save)
{
}
if(field ==_cancel)
{
}
}
}



Any idea please.
Offline  
Old 10-24-2008, 09:23 AM   #8 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2006
Model: NONE
Carrier: t-mobile
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

To the poster above...

You are not involking the super constructor, which is required by the PopupScreen class because you extended it.

So inside your current constructor EditScreen, call something like

Code:
       super(new VerticalFieldManager(),Field.FOCUSABLE);
Your code should then work. You can use whatever Manager you want in super the parameter. Hope this helps.
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

MSA ALTAIR 4 MULTI GAS MONITOR DETECTOR+ CHARGH CRADLE + UNIVERSAL PUMP PROBE
$149.0
MSA ALTAIR 4 MULTI GAS MONITOR DETECTOR+ CHARGH CRADLE + UNIVERSAL PUMP PROBE  pictureMSA altair 4X multi gas Meter Monitor detector, O2,H2S,CO,LEL. Great condition
$250.0
MSA altair 4X multi gas Meter Monitor detector, O2,H2S,CO,LEL. Great condition pictureMSA Altair 4x Gas Monitor - LEL,O2,CO,H2S. w/charger
$168.77
MSA Altair 4x Gas Monitor - LEL,O2,CO,H2S. w/charger pictureMSA ALTAIR 4X Multigas Detector Part#AXL0BNC0000
$599.99
MSA ALTAIR 4X Multigas Detector Part#AXL0BNC0000 pictureMSA Instrument Division Altair Pro O2 Single Gas Detector
$120.0
MSA Instrument Division Altair Pro O2 Single Gas Detector picture






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