BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-08-2008, 10:39 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Nov 2008
Model: 8800
PIN: N/A
Carrier: simulator
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Editfield with suffix

Please Login to Remove!

hi guys,

is it possible to create one editfield and labelfield (as a suffix) at one row ?

ex.:

_____________.test.com

___ = EditField


Thanks
Offline  
Old 12-09-2008, 03:48 AM   #2 (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

sure, use a horizontalfieldmanager and add an editfield and a labelfield. be sure to overwrite the width of the editfield though.
or extend editfield and implement your behaviour in the draw method.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 12-09-2008, 03:58 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Nov 2008
Model: 8800
PIN: N/A
Carrier: simulator
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Simon,

i try to do based on your clue, here is the code:

PHP Code:
HorizontalFieldManager gg = new HorizontalFieldManager();
gg.add(new BasicEditField(""""));
gg.add(new LabelField(".test.com"0,0,LabelField.FIELD_RIGHT USE_ALL_WIDTH));
add(gg); 
but it's not working, i only saw the EditField.
Offline  
Old 12-09-2008, 05:35 AM   #4 (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

editfield uses all available width, you have to constrain it by overwriting getwidth and/or getpreferredwidth (i think only the fiest one, not sure, i use an absolute layout manager for these things).
__________________
java developer, Devinto, hamburg/germany
Offline  




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