BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-23-2009, 01:28 AM   #1 (permalink)
New Member
 
Join Date: Oct 2009
Model: 8820
PIN: N/A
Carrier: ad
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Set size for button

Please Login to Remove!

I start coding for Blackberry today. After install and run HelloWorld example. I try to create the first program like calculator program. I create some ButtonField and use Horizontal and Vertical Field Manager to display UI components. But the size of buttons depend on the labels while i want to they are same. I don't know how to resize the buttons. And when i use custombuttonsdemo to resize. It ok but the listener of CustomButton not work. Here is my code :
Quote:
public void fieldChanged(Field field, int context)
{
if (field instanceof CustomButtonField) {
str = str + ((CustomButtonField)field).getText();
}

else if (field instanceof ButtonField)
{
ButtonField buttonField = (ButtonField)field;
str = str + buttonField.getLabel();
}
display.setText(str); //display is BasicEditField
}
And when i press on the CustomButton, pointer move to the button below.
What function i must override to make CustomButton likes ButtonField?
Offline  
Old 10-26-2009, 07:53 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Mar 2007
Location: India
Model: 8100
Carrier: Airtel
Posts: 64
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Set size for button

Can you post your code of custombuttonfield so that i can tell you what exactly you need to do?
__________________
Crazy for BlackBerry
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

GE Fanuc 10 Slot Base w/ CPU, # IC693CPU321H, Used, Warranty
$48.5
GE Fanuc 10 Slot Base w/ CPU, # IC693CPU321H, Used, Warranty pictureAir Techniques A/T 2000 XR Dental X-Ray Film Processor & Developer - For Parts
$467.42
Air Techniques A/T 2000 XR Dental X-Ray Film Processor & Developer - For Parts pictureSIEMENS 6AR1300-0EC20-0AA0, SMP16-CPU035 Processor SMP Bus as photo sn:2401 lφo
$1499.15
SIEMENS 6AR1300-0EC20-0AA0, SMP16-CPU035 Processor SMP Bus  as photo sn:2401 lφo pictureSIEMENS 6AR1300-0EC20-0AA0 , SMP16-CPU035 Processor SMP Bus sn:2403 Pro1
$902.41
SIEMENS 6AR1300-0EC20-0AA0 , SMP16-CPU035 Processor SMP Bus sn:2403 Pro1 pictureKoyo SU-6B PLC , CPU and input output unit PLC set as photo, sn:1603 dφm
$482.74
Koyo SU-6B PLC , CPU and input output unit PLC set as photo, sn:1603 dφm  picture






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