blackberry-editfield

Adding Editfield to Popup screen

Deadly 提交于 2019-12-25 03:44:22
问题 I have created my own custom popup screen to which now I am trying to add a editfield , everything seems to be fine but the problem is that I am not able to write anything in the edit field class sveetIt extends PopupScreen implements FieldChangeListener, DialogClosedListener { Hashtable pitemData; ButtonField sveetNowlabelField; ButtonField sveetLaterlabelField; WatingScreen watingScreen; long scheduledTime; Dialog updateDialog; public sveetIt() { super(new MyCustimGridFieldManager());

Set the height and width of EditField on BlackBerry

旧时模样 提交于 2019-12-24 07:53:54
问题 I want to set the height and width of an EditField in my BlackBerry app. 回答1: You need to override the field's layout method to set the size for you: protected void layout(int width, int height) { super.layout(customWidth, customHeight); setExtent(customWidth, customHeight); } where customWidth and customHeight have been set by you elsewhere. super.layout(customWidth, customHeight) lays the field out to use your special width & height. setExtent(customWidth, customHeight) sets the size of the

Blackberry - Custom size EditField

試著忘記壹切 提交于 2019-12-19 04:56:26
问题 I am trying to put together a dialog that should look like this: Fill in the below fields _______________ likes ____________________ where the "_" lines are the EditFields. I am sticking all the fields in a HorizontalFieldManager, which I add to the dialog. Unfortunately, the first EditField consumes all the space on the first line. I have tried to override the getPreferredWidth() method of the EditField by creating my own class extending BasicEditField, but have had no success. Surely there

Custom editfield not displaying all typed text

倾然丶 夕夏残阳落幕 提交于 2019-12-11 22:14:14
问题 Below class is a textbox field. Can this be modified so that when the textbox is filled with text and user keeps type the text then scrolls ? Whats happening now is that once the textbox is filled with text any subsequent text that is typed is not being displayed. Thanks import net.rim.device.api.ui.Color; import net.rim.device.api.ui.Font; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.component.EditField; public class CustomEditField extends EditField { // private

Thick border for rounded button in blackberry

ぃ、小莉子 提交于 2019-12-08 12:18:49
问题 I am getting this... I want the below image I am newbee in Blackberry. I want to give thick border to the rounded button field in my application. Below is my code. I have created a CustomBasicEditField class. protected void paint(Graphics graphics) { int x = (this.getWidth() - getFont().getAdvance(text)) >> 1; int y = (this.getHeight() - getFont().getHeight()) >> 1; graphics.setColor(backgroundColour); graphics.fillRoundRect(0, 0, fieldWidth, fieldHeight, 40, 40); graphics.setColor(border

Blackberry - Custom size EditField

倖福魔咒の 提交于 2019-12-01 01:19:24
I am trying to put together a dialog that should look like this: Fill in the below fields _______________ likes ____________________ where the "_" lines are the EditFields. I am sticking all the fields in a HorizontalFieldManager, which I add to the dialog. Unfortunately, the first EditField consumes all the space on the first line. I have tried to override the getPreferredWidth() method of the EditField by creating my own class extending BasicEditField, but have had no success. Surely there must be a simple way to force a certain size for an edit field. What am I missing? Just like