BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 10-21-2008, 12:00 PM   #1
taqi.mir
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
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
taqi.mir
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
Default

Any idea.
Offline  
Old 10-21-2008, 01:18 PM   #3
remaerdlacidar
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 9000
PIN: N/A
Carrier: Rogers
Posts: 17
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
taqi.mir
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
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
sunnan
Thumbs Must Hurt
 
Join Date: Nov 2007
Model: 8100
PIN: N/A
Carrier: vodafone
Posts: 61
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
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
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
taqi.mir
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
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
Cool6324
Knows Where the Search Button Is
 
Join Date: Jul 2006
Model: NONE
Carrier: t-mobile
Posts: 15
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Onset Computer Analog/Temp/RH/Light Data Logger MX1104 Onset Computer MX1104 picture

Onset Computer Analog/Temp/RH/Light Data Logger MX1104 Onset Computer MX1104

$261.31



5 Titanium Analog 3D CAD/CAM, Dental Internal Hex 2.42mm Library Digital Model picture

5 Titanium Analog 3D CAD/CAM, Dental Internal Hex 2.42mm Library Digital Model

$93.00



USED Foxboro 556-9-30 Pneumatic Analog Computer St.C 3-15 PSI picture

USED Foxboro 556-9-30 Pneumatic Analog Computer St.C 3-15 PSI

$125.00



Schneider PLC TWIDO TM2AMM6HT ANALOGUE I/O MODULE 20mA 24VDC Missing Terminal picture

Schneider PLC TWIDO TM2AMM6HT ANALOGUE I/O MODULE 20mA 24VDC Missing Terminal

$156.00



10 Titanium Multi Unit 1.6 Analog Model 3D CAD/CAM System Library Digital Lab picture

10 Titanium Multi Unit 1.6 Analog Model 3D CAD/CAM System Library Digital Lab

$169.90



Measurement Computing PCI-DAS6025, Analog & DIO Card as photo, sn:rφm, Promotion picture

Measurement Computing PCI-DAS6025, Analog & DIO Card as photo, sn:rφm, Promotion

$199.19







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