Objectchoicefield custom

Hai all,
I need to implement the button and label field of objectchoice with separate click to button and label (or listview complete) event, please give suggestions to implement the custom objectchoicefield.

The name of the company must establish a click event to view the details and the distinct x (delete button) need separate, click event to remove the choice of listfield.

Thank you.

You ask a lot of us aren't you?

I suggest you just start trying to do just one of these things, something code that you think the work and we could help you get the code works.

But I must point out that I've never seen anything like that on the BlackBerry that works as an ObjectChoiceField and is the kind of thing you're after.  So I suspect that you maybe isn't able to implement features as requested, or if you can, it will take a lot of time.  You might think to simplify the obligation.

Remember that an ObjectChoiceField is not a click event different for different parts of the drop down, so you won't be able to use it.  You need to create something else.  In this kind of situation, I have in the past, created a popup screen to display the values of 'pull down', but this clearly does not resemble a pull down, even if it provides the same functionality.

Tags: BlackBerry Developers

Similar Questions

  • ObjectChoiceField customized for beautiful

    We know the value default ObjectChoiceField looks like not very good in BB, so I want to create a new ObjectChoiceField custom, the sample image is as below:

    Who can tell me how to implement this, the default list of ObjectChoiceField, which we cannot change, if we need to use a new field to implement anyone can give me some ideas, thank you.

    You don't have to use the popup screen.

    You can build your own screen, for example its extension off the screen.

    Then in your form, you can define the position and scope in the method sublayout.

      protected void sublayout(int width, int height)
      {
                    int myWidth = width - getMarginLeft() - getMarginRight();
                    int myHeight = height - getMarginTop() - getMarginBottom();
                    int myX = getMarginLeft();
                    int myY = getMarginTop();
    
                    // layout everything within this screen
                    layoutDelegate(myWidth, myHeight);
                    setPositionDelegate(0, 0);
    
                    int delegateHeight = getDelegate().getHeight();
    
                    if (delegateHeight < myHeight)
                    {
                            // do a vertical center
                        myY = (height - delegateHeight) >> 1;
                        myHeight = delegateHeight;
                    }
    
                    // set position and extent
                    setPosition(myX, myY);
                    setExtent(myWidth, myHeight);
    }
    

    This is just one example.  It works for my drop-down list control.  I simply only have so much space that my margin is on the borders.  You will probably need to change it works for your case.

    When you press this screen using pushScreen, if you set the position/measure so that it does not cover the entire screen, you should always be able to see the screen below.

  • How to remove a Custom DDL or ObjectChoiceField

    Hi all

    I am doing a shopping basket sort of thing...! for this I need to change the dropdownlists dynamically on the selection.

    !) When the user selects the button category, main ddl should be updated.

    (2) when the user selects a subacaegory of DOF, DOF sub must be courses.

    I realized this some how... dynamically, I changed the reference to the ddl and updated. It works fine but the problem is, when an another DOF makes its appearance the previous is there remain only and a new is overwhelming at this point. as a result when the width of the new ddl is lower than the previous ddl, it appeared in her underwear, which kills the look and feel of the screen.

    in some ways, I tried to remove the ddl, but it does not work for me.

    Please suggest me how to remove the ddl dynamically, when I try to remove it, it gives IllegalArgumentException meaning is the ddl

    not this Manager field. I'm removing the same administrator only, but I have not found why it's happening...!

    Please help me! Here is my

    It's my custom ddl code.

    public class CustomComboBox extends ObjectChoiceField   {
    
          private int width;        public boolean itemadded = false;
    
    //       CustomComboBox()//        {////         super("Currency",curr, 0, ObjectChoiceField.FIELD_LEFT);//        }     public CustomComboBox(String str,String []curr, int width)        {         super(str, curr, 0, ObjectChoiceField.FIELD_LEFT | ObjectChoiceField.USE_ALL_WIDTH);          this.width = width;           Font font = this.getFont().derive(Font.EMBOSSED_EFFECT | Font.BOLD, 14);          this.setFont(font);
    
         }     public CustomComboBox(String str,String []curr, int startindex, int width)        {         super(str, curr, startindex, ObjectChoiceField.FIELD_LEFT | ObjectChoiceField.USE_ALL_WIDTH);         this.width = width;           Font font = this.getFont().derive(Font.EMBOSSED_EFFECT | Font.BOLD, 14);          this.setFont(font);       }     protected void layout(int width, int height)      {         setExtent(this.width, 40);        }     public void paint(Graphics g)     {           //            g.setBackgroundColor(Color.BLUE);//           g.clear();            g.setColor(Color.BLACK);          super.paint(g);       }     public void setVisiblity(boolean on)      {//           this.setVisualState(VISUAL_STATE_DISABLED);//         this.setVisualState(VISUAL_STATE_DISABLED_FOCUS);
    
          }     protected void fieldChangeNotify(int context)        {          try {              this.getChangeListener().fieldChanged(this, context);                 } catch (Exception exception) {               }        } }
    

    This is the place where to use this object class

    class ItemList extends Manager implements FieldChangeListener{  SubItemList subitems;
    
      String []cycleitems = {"Standard", "Kids", "Racers"}; String []spareitems = {"Tyres", "Tubes", "Covers"};   String []healthitems = {"Medicines","Fruits","Drinks"};   String []fitnessitems = {"Walker", "Dumbles"};    String []empty = {"                    "};
    
      CustomComboBox ddl_cycle, ddl_spares, ddl_fitness, ddl_health, ddl;   MyTextField lbl_subcategory;//    CustomTextBox txt_qty;    ItemList(int index)   {     super(Manager.VERTICAL_SCROLL | Manager.HORIZONTAL_SCROLL);
    
            subitems = new SubItemList(index,0);
    
          ddl_cycle = new CustomComboBox("Cycles", cycleitems,  140);       ddl_spares = new CustomComboBox("Spares", spareitems, 140);       ddl_health = new CustomComboBox("Health", healthitems, 140);      ddl_fitness = new CustomComboBox("Fitness", fitnessitems,140);        ddl = new CustomComboBox("",empty ,100);
    
          lbl_subcategory = new MyTextField("Sub-Category:",Field.FIELD_LEFT, 16);//        lbl_qty = new MyTextField("Qty", Field.FIELD_LEFT, 16);//     txt_qty = new CustomTextBox(30,20);
    
          ddl_cycle.setChangeListener(this);        ddl_spares.setChangeListener(this);       ddl_health.setChangeListener(this);       ddl_fitness.setChangeListener(this);
    
          switch(index)     {         case 0: ddl = ddl_cycle;                  break;            case 1: ddl = ddl_spares;                 break;            case 2: ddl = ddl_health;                 break;            case 3: ddl = ddl_fitness;                    break;        }     add(lbl_subcategory);     add(ddl);     add(subitems);    } public void delItems()    {     subitems.delSubItems();       deleteAll();  } public void setvisibility(boolean on) {     ddl.setVisiblity(false);  } protected void sublayout(int width, int height)   {     if(lbl_subcategory != null)       {         setPositionChild(lbl_subcategory, 0, 25);         layoutChild(lbl_subcategory, getScreen().getWidth(), getScreen().getHeight());        }
    
          setPositionChild(ddl, 110, 15);       layoutChild(ddl, getScreen().getWidth(), getScreen().getHeight());
    
          if(subitems != null)      {         setPositionChild(subitems, 0, 60);            layoutChild(subitems, getScreen().getWidth(), getScreen().getHeight());       }
    
          setExtent(360, 150);  }
    

    This is the place where works the dynamic change of ddl

    class OrderEntryManager extends Manager implements FieldChangeListener{
    
    ItemList items;    ButtonField   btn_submit;     MyButtonField  btn_cycles, btn_spares, btn_health, btn_fitness, btn_go;
    
    OrderEntryManager(){items = new ItemList(0);btn_cycles = new MyButtonField("Cycles", "orderimg/cycle.png", "orderimg/cycle.png",0x00FFE7AD);     btn_spares = new MyButtonField("Spares", "orderimg/spares.png", "orderimg/spares.png",0x00FFE7AD);        btn_fitness = new MyButtonField("Fitness", "orderimg/fi.....);
    
    add(items);
    
    }public void fieldChanged(Field field, int context)    {
    
          if(field instanceof MyButtonField)        {         if (((MyButtonField) field).getLabel().equalsIgnoreCase("Cycles"))            {//               items.delItems();//               this.delete(items);//             items.setVisualState(VISUAL_STATE_DISABLED);              items.setvisibility(false);               items = new ItemList(0);              add(items);            }            else if (((MyButtonField) field).getLabel().equalsIgnoreCase("Spares"))           {//               items.setVisualState(VISUAL_STATE_DISABLED);//                items.setvisibility(false);               items = new ItemList(1);              add(items);//             items = itemsnew;         }         else if (((MyButtonField) field).getLabel().equalsIgnoreCase("Health"))           {//               items.setVisualState(VISUAL_STATE_DISABLED);//                items.setvisibility(false);               items = new ItemList(2);              add(items);//             items = itemsnew;         }         else if(((MyButtonField) field).getLabel().equalsIgnoreCase("Go"))            {
    
              }         else if (((MyButtonField) field).getLabel().equalsIgnoreCase("Fitness"))          {//               items.setVisualState(VISUAL_STATE_DISABLED);//                items.setvisibility(false);               items = new ItemList(3);              add(items);//              items = itemsnew;            }     }     else if (field instanceof ButtonField)         {//           if (((ButtonField) field).getLabel().equalsIgnoreCase("Fitness"))//              {//                   items = new ItemList(3);//                    add(items);// //               items = itemsnew;  //                }           if(((ButtonField) field).getLabel().equalsIgnoreCase("Submit"))             {               synchronized(Application.getEventLock())                    {                     UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());                       UiApplication.getUiApplication().pushScreen(new OrderConfirmScreen());                    }             }      }            if(items != null)         {             updateLayout();           }
    
     }
    
    }
    

    Please suggest me how to remove the ddl for this!

    Hi all, I have solved this problem by using ddl.setChoice (String []);

    Thank you for all that you.

  • Weird ObjectChoiceField in OptionsProvider

    I don't really know if it is related to the OptionsProvider, but here is the screen with the problem (labels wrapped):

    I have several ObjectChoiceField- s, added to the screen, and when I open it first time in the application I see that.

    The next time or when I opened this page of third... everything looks OK.

    It is interesting when it happens in 7.0 + and is not in 6.0

    All the fields have been created as:

    new ObjectChoiceField("Homesceen Icon" , new String[] { "On", "Off" } , 0);new ObjectChoiceField("Update Frequency" , new String[] { "30 minutes", " 15 minutes ",  "10 minutes"  } , 0);
    

    OK, if someone is interested, to fix it i:

    1 created horizontal custom Manager,

    2 put LabelField and ObjectChoiceFiled with empty label

    3. in sublayout method defined calculated positions and extensions of these objects.

    It works as it should now.

    I guess that, OS 7.0 introduced a bug in ObjectChoiceField.

  • Setting width of objectchoicefield

    Hello

    I want to ObjectChoiceField without tag and set its width on screen width in my project. Suggest me the way to do this

    Thanks in advance

    Check this box to learn how to make a custom presentation:
    http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

    in your case, you can also try to crush getPreferredWidth, but do not know if it works on a choicefield

  • FieldChangedListener not shooting at the selection point in ObjectChoiceField

    So the custom FieldChangedListner that I have attached to my ObjectChoiceField I coded to trigger a popup when a certain item is selected does not fire not at all (is not the FieldChangedListner) when the user opens the select list and chooses this point that triggers the popup, while they are already about this.

    I understand that the BONE probably does not pull it because the area has not actually changed the selection, the selection remains on the same element, even if the user has entered in selection mode and same selected item.

    The question I have is: is their way to trigger an event when the user selects the item even they have currently selected? If so, can someone tell me how to proceed?

    Thank you.

    Seems that fieldChangedListener works correctly if it said you that when the selected item changes.

    I think on the substitution of onFocus and reset the selection if you what to have the kind of level of control that you are after.

  • Tips for making a custom NumericChoiceField

    I had an ugly behavior with NumericChoiceFields and HorizontalFieldManager... So I want to create a custom that will change the background color and width. Can someone give me a suggestion about where to start? I guess it's a lot different, custom, then labelfields and others. Thank you!

    I thought that NumericChoiceField was a variant of ObjectChoiceField and taken as its width, the largest of its entries, so the width that you see is a surprise for me.  Something, I'll have to test, but I can't do it now.

    In regard to being on the right, if you use the Style

    Field.FIELD_HCENTER

    who should set the fields in the Center for you.

    As a test, you can create an ObjectChoiceField with just 1-5 as the selected objects, and I think it should be more restricted.  Let us know how you go with it.

    You can find you using your own Manager Simon suggests, but there may be a way around him in this case we should look at first.

  • Define a height predetermined for an ObjectChoiceField

    I have an application with an ObjectChoiceField that displays the different names, some names are very long so I want to fix the ObjectChoiceField if he would measure the same and only a line of text even if the selection is longer than that, is it possible?

    Thank you all,.

    I found a solution without having to create a custom choice field.

    When you create the choice of the Field object, override the methods page layout and the getPreferred height. GetPreferredHeight, the height should be set and the method of layout should look like this:

    Protected Sub layout (int width, int height) {}
    setExtent ((getPreferredWidth (), width), Math.min Math.min (getPreferredHeight (), height));
    } //layout

  • ObjectChoiceField layout problem

    Hi friends,

    I'm putting an ObjectChoiceField on the 8900 4.6.1 OS version and the rect of the field is not shown.

    5.0 Os version works quite well.

    below the picture on 4.6.1...  The two fields are editable ObjectChoiceFields.

    Note: the functtionality is correct only visual is not good in 4.6.1.

    Thank you all.

    It is a behavior of OS version, I realized. The solution was to implement a custom choicefield.

  • How to set a width of ObjectChoiceField?

    Hello

    can someone tell me how I can set a width of objectchoicefield.

    Suppose that there are two values in objectchoicefield.

    'abc '.

    "abcdefg".

    now I want the width should be equal to the string max.

    When I select abc the objectchoicefield become smaller compared to the "abcdefg".

    now I want the width should be equal to the string max.

    Hello

    I think you should write an overring of the custom ObjectChoiceField class by provision of overring, paint, drawfocus etc needs to satisfy you.

    OK, here's one of my custom ObjectChoiceField class. Copy pasted from one of my old code.

    I think that playing around with the code you will should be able to do like yours.

    import net.rim.device.api.ui.component.ObjectChoiceField;
    import net.rim.device.api.ui.Graphics;
    import java.lang.String;
    import net.rim.device.api.ui.XYRect;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.system.Bitmap;
    
    public class CustomChoiceField extends ObjectChoiceField
    {    
    
        /** Constants for the horizontal text alignment */
        public static final int TEXT_HALINGMENT_LEFT = 0;
        public static final int TEXT_HALINGMENT_CENTER = 1;        
    
        /** Array of choices */
        String[] m_Choices;    
    
        /** Left margin of the field */
        private int m_MarginLeft = 1;    
    
        /** Right margin of the field */
        private int m_MarginRight = 1;    
    
        /** Top margin of the field */
        private int m_PaddingTop = 5;    
    
        /** Top margin of the field */
        private int m_PaddingBottom = 5;        
    
           /** Top margin of the field */
        private int m_MarginTop = 5;    
    
        /** Top margin of the field */
        private int m_MarginBottom = 5;       
    
        /** Right margin of the text in the selectbox */
        private int m_TextMarginRight = 5;    
    
        /** Left margin of the text in the selectbox */
        private int m_TextMarginLeft = 5;    
    
        /** Horizonta text alingment */
        private int m_HTextAlignment = TEXT_HALINGMENT_CENTER;    
    
        /** Width of the chpice box */
        private int m_ChoiceFieldWidth;    
    
        /** Height of the field */
        private int m_Height;    
    
        /** Determones is field focused */
        private boolean m_isFocused = false;    
    
        /** Width of thr DropDown arrow */
        private int m_DropDownArrowWidth;        
    
        /** Field default color */
        private int m_DefBgColor = 0xffffff;    
    
        /** Field text default color */
        private int m_DefTextColor = 0;    
    
        /** Field color when it is focused */
        private int m_FocusedBgColor = 0xf6921e;    
    
        /** Field text color when it is focused */
        private int m_FocusedTextColor = 0;        
    
        /**     * Constructor. The width of choice box became as big as
        * maximum length of choice strings + text marfins + derop-down arrow width.
        * *      * @param String - label of the field
        * * @param String[] - field choices
        * */
        public CustomChoiceField(String label, String[] choices)
        {
            super(label, choices);
            m_Choices = choices;        
    
            //dimensions of selectable field
            Font currFont = getFont();
            m_DropDownArrowWidth = m_Height = currFont.getHeight();
            m_ChoiceFieldWidth = currFont.getAdvance(choices[0]);
            for(int i = 1; i < choices.length; i++)
            {
                if(m_ChoiceFieldWidth < currFont.getAdvance(choices[i]))
                    m_ChoiceFieldWidth = currFont.getAdvance(choices[i]);
            }
            m_ChoiceFieldWidth += m_TextMarginLeft + m_TextMarginRight + m_DropDownArrowWidth;
        }        
    
        /**     * Constructor. The width of choice box became as big as
        * maximum length of choice strings + text marfins + derop-down arrow width.
        * *
        * * @param String - label of the field
        * * @param String[] - field choices
        * * @param int - initial choice index
        * */
        public CustomChoiceField(String label, String[] choices, int initialIndex)
        {
            super(label, choices, initialIndex);
            m_Choices = choices;        
    
            //dimensions of selectable field
            Font currFont = getFont();
            m_DropDownArrowWidth = m_Height = currFont.getHeight();
            m_ChoiceFieldWidth = currFont.getAdvance(choices[0]);
            for(int i = 1; i < choices.length; i++)
            {
                if(m_ChoiceFieldWidth < currFont.getAdvance(choices[i]))
                    m_ChoiceFieldWidth = currFont.getAdvance(choices[i]);
            }
            m_ChoiceFieldWidth += m_TextMarginLeft + m_TextMarginRight + m_DropDownArrowWidth;
        }        
    
        /**
        * Constructor. The width of choice box became as big as
        * * maximum length of choice strings + text marfins + derop-down arrow width.
        * *
        * * @param String - label of the field
        * * @param String[] - field choices
        * * @param int - initial choice index
        * * @param long - field style(see ObjectChoiceField styles)
        * */
        public CustomChoiceField(String label, String[] choices,  int initialIndex, long style)
        {
            super(label, choices, initialIndex, style);
            m_Choices = choices;
            //dimensions of selectable field
            Font currFont = getFont();
            m_DropDownArrowWidth = m_Height = currFont.getHeight();
            m_ChoiceFieldWidth = currFont.getAdvance(choices[0]);
            for(int i = 1; i < choices.length; i++)
            {
                if(m_ChoiceFieldWidth < currFont.getAdvance(choices[i]))
                    m_ChoiceFieldWidth = currFont.getAdvance(choices[i]);
            }
            m_ChoiceFieldWidth += m_TextMarginLeft + m_TextMarginRight + m_DropDownArrowWidth;
        }        
    
        /**
        * Set field choices
        * *
        * * @param String[] - array of field choices
        * */
        public void setChoices(Object[] choices)
        {
            super.setChoices(choices);
            m_Choices = (String[])choices;
        }        
    
        /**
        * Set field margins. This method takes an effect for
        * * parameter to be >= 0.
        * *
        * * @param int - left margin of the field
        * * @param int - right margin of the field
        * * @param int - top margin of the field
        * * @param int - bottom margin of the field
        * */    
    
        public void setMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)
        {
            if(marginLeft >= 0)
                this.m_MarginLeft   = marginLeft;
            if(marginRight >= 0)
                this.m_MarginRight  = marginRight;
            if(marginTop >= 0)
                this.m_MarginTop    = marginTop;
            if(marginBottom >= 0)
                this.m_MarginBottom = marginBottom;
        }        
    
        /**
        * Set horizontal text alignment in the text box.
        * *
        * * @param int - alignment of the text
        * */
        public void setTextHAlignment(int alignment)
        {
            m_HTextAlignment = alignment;
        }        
    
        /**
        * Set choice box width.
        * *
        * * @param int - choice box width.
        * */
        public void setChoiceWidth(int width)
        {
            m_ChoiceFieldWidth = width;
        }        
    
        /**
        * Set text font.
        * *
        * * @param int - font style (see Font class)
        * * @param int - font height
        * * @param boolean - if true control height updates according to the new font height.
        * */
        public void setTextFont(int style, int height, boolean updateHeight)
        {
            this.setFont(getFont().derive(style, height));
            if(updateHeight)
                m_DropDownArrowWidth = m_Height = getFont().getHeight();
        }        
    
        /**
        * Method retrieves this field's preferred width.
        * *
        * * @return int - field's preferred width
        * */
        public int getPreferredWidth()
        {
            return m_MarginLeft + m_MarginRight + m_ChoiceFieldWidth + getFont().getAdvance(getLabel());
        }        
    
        /**
        * Method retrieves this field's preferred height.
        * *
        * * @return int - field's preferred height
        * */
        public int getPreferredHeight()
        {
            return m_MarginTop + m_PaddingTop + m_PaddingBottom + m_MarginBottom + m_Height;
        }        
    
        /**
        * Determines if this field accepts the focus.
        * *
        * * @return boolean - always true.
        * */
        public boolean isFocusable()
        {
            return true;
        }        
    
        /**
        * Retrieves this field's current focus region.
        * *
        * * @param XYRect - object to contain the focus rect for this field in local coordinates
        * */
        public void getFocusRect(XYRect rect)
        {
            rect.set(m_MarginLeft + getFont().getAdvance(getLabel()), m_MarginTop , m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop);
        }        
    
        /**
        * Draws the focus indicator for this field
        * *
        * * @param Graphics - graphics context for drawing the focus
        * * @param boolean - true if the focus should be set; otherwise, false.
        * */
        protected void drawFocus(Graphics graphics, boolean on)
        {
            invalidate();
        }        
    
        /**
        * Lays out field contents.
        * *
        * * @param int - amount of available horizontal space.
        * * @param int - amount of available vertical space.
        * */
        protected void layout(int width, int height)
        {
            setExtent(Math.min(getPreferredWidth(), width), Math.min(getPreferredHeight(), height));
        }        
    
        /**
        * Invoked when a field receives the focus.
        * *
        * * @param int - Indicates from which direction the focus enters the field.
        * */
        public void onFocus(int direction)
        {
            m_isFocused = true;
            invalidate();
        }        
    
        /**
        * Invoked when a field loses the focus.
        * */
        public void onUnfocus()
        {
            m_isFocused = false;
            invalidate();
        }        
    
        /**
        * Method draws a edit field.
        * *
        * * @param Graphics - graphic context.
        * */
        public void paint(Graphics g)
        {
            Bitmap image = Bitmap.getBitmapResource("dropdown.png");
    
            String visibleText = (getSelectedIndex() == -1 || getSelectedIndex() >= m_Choices.length)?"":m_Choices[getSelectedIndex()];
            int textLength = getFont().getAdvance(visibleText);
            int labelLength = getFont().getAdvance(getLabel());
            int textY = m_MarginTop + m_PaddingTop + (m_Height - getFont().getHeight())/2;
            if(textY < 0)
                textY = m_MarginTop;                
    
            //Text can be as big as text box field
            while(textLength > m_ChoiceFieldWidth - m_TextMarginLeft - m_TextMarginRight - m_DropDownArrowWidth && visibleText.length() > 0)
            {
                visibleText = visibleText.substring(0, visibleText.length()-1);
                textLength = getFont().getAdvance(visibleText);
            }
            int textX = (m_HTextAlignment == TEXT_HALINGMENT_CENTER)?              m_MarginLeft + labelLength + m_TextMarginLeft + (m_ChoiceFieldWidth - m_TextMarginLeft - m_TextMarginRight - m_DropDownArrowWidth - textLength)/2:
            m_MarginLeft + labelLength + m_TextMarginLeft;
            if(textX < 0)            textX = m_MarginLeft + labelLength + m_TextMarginLeft;                
    
            g.setColor(0);
            g.drawText(getLabel(), m_MarginLeft, textY);
            if(m_isFocused == false)
            {
                image = Utils.resizeBitmap(image, m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop);
                /*
                //Draw edit box bg
                g.setColor(m_DefBgColor);
                g.fillRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);            
    
                //Draw edit box rect
                g.setColor(0);
                g.drawRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);
                //Draw edit box text
                */
                g.drawBitmap(m_MarginLeft + labelLength, m_MarginTop,  m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop, image, 0, 0);
    
                g.setColor(m_DefTextColor);
                g.drawText(visibleText, textX, textY);            
    
                //g.drawText(Integer.toString(cursorPosition), m_MarginLeft + labelLength + m_TextMarginLeft, textY);
            }
            else
            {
                //Draw edit box bg
                //g.setColor(m_FocusedBgColor);
                /*m_FocusedBgColor = ApplicationTheme.DEFAULT_TEXT_BOX_BACKGROUND_COLOR_ON_FOCUS;
                g.setColor(m_FocusedBgColor);
                g.fillRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);            
    
                //Draw edit box rect
                g.setColor(0);
                g.drawRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);          
    
                //Draw edit box bg
                g.setColor(m_DefBgColor);
                g.fillRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);
                */
    
                image = Utils.resizeBitmap(image, m_ChoiceFieldWidth, m_Height  + m_PaddingBottom + m_PaddingTop);
                g.drawBitmap(m_MarginLeft + labelLength, m_MarginTop,  m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop, image, 0, 0);  
    
                //Draw edit box rect
                g.setColor(0);
                g.drawRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop);
                //Draw edit box text 
    
                //Draw edit box text
                g.setColor(m_FocusedTextColor);
                g.drawText(visibleText, textX, textY);
            }
        }
       }
    

    Let me know if you still have problems.

    Concerning

    Bika

  • Request signature and custom fields

    Hello

    I just spent 3 weeks on the customization of most of the components used in my application for LabelField and ObjectChoiceField on the screen together, but when I install the application on the device, it throws 'Exception API blocked' and closes.

    Can someone tell me what is the solution for this?

    Note 1: I used custom MenuItem and it was working fine, but I don't know what happened with HorizontalFieldManager, VerticalFieldManager, LabelField, and ObjectChoiceField! (is it possible because I tried to override the method paint them?)

    Note 2: I learned that I have to sign the application to continue. Is it possible apart from that?

    Help, please!

    The view class must sign.
    The signing key is $ 20 for a lifetime, even amateur developers should be able to afford it.
    Other then that you could probably use Graphics.getScreenHeight (), but it is deprecated in future versions of the JDE, use at your own risk.

  • ObjectChoiseField custom

    Hello world.

    Well, I have a problem. I create screen with 'unusual' - buttons, text changes etc. Design controls.

    So, already I create all the controls, except one. I could not create a custom drop-down list. I don't know how I could draw an ignore list - it is a real problem for me. Do I have to draw some modal screen for this or something like this? How could he be drawn? Maybe it's possible to 'redraw' the design of ObjectChoiceield?

    Thus, it is a problem. Could someone help me?

    Thank you.

    Hi magfed,

    I find the best way to do this is to have the default value ObjectChoiceField RIM do all the work for you, the secret is to call super.pain () in the method public void paint (Graphics g) of your legacy field. In this way, when you click on the CustomObjectChoiceField, you will receive the contextual display of the values.

    Thus,.

    1. class CustomObjectChoiceField extends ObjectChoiceField

    2.

    public void paint(Graphics g) {
        super.paint(g);
        g.clear();
        //do custom code/drawing here
    }
    

    This will give you a personalized just ObjectChoiceField by keeping the features in the list.

    Hope this is what you are looking for.

    Concerning

  • The return value to the line for dialogue ObjectChoiceField

    Hello world

    Is it possible the value of line so that when the items in ObjectChoiceField Dialog(the one that's pops up when you click on the field) appears on multiple lines according to the width of the text?

    For now, it shows only one line per element truncate the ending text substituting... If any, it is displayed in several line wrapped Word when selected however.

    For any help or suggestion would be greatly appreciated that I would need to display the full text when the user scrolls items in the context menu

    Thank you & best regards

    Maia

    This is not supported by the ObjectChoiceField.  You can create a custom field to accomplish this where you manually draw the sting using a Graphics object.

  • Add ObjectChoiceField at the end of the Manager

    Hai friends...

    I want to be on the same line, then I made custom Editfield expanding Editfield and add it on HorizontalFieldManager I EditFIeld and ObjectChoiceField.

    Now, I want the OblectCoiceField on the other end of the Manager which is the end of the screen,

    If I use FIELD_RIGHT way of ObjectChoiceField this is not provided at the end

    How to do this

    This should help:
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

  • Poor - and not yet no answer customer service!

    Hello!

    My apologies for the weird subject but heading I really wanted to attract someone's attention because at the present time (a guy called Paul online support side) nobody came back to me at all about my recent visit to your store from Covent Garden and the very disappointing time there.

    In short if your management team he has just done what they said they'd do and return my call to discuss things further as a guy named will be very kindly suggested I do we would not be here!

    This email comes from me trying to talk to a member of the management team after my visit to Covent Garden on September 22 and the feedback left by me after my experience so far here.

    Will me has called and left a message on 30 September by inviting me to remember to discuss also I have does - no call back. So I didn't call back the next day - no call back and the next day still no call. We are now on day 5 and after talking to someone in the store who very frankly really seemed to not want to be there and really seemed not the least bit interested to help me at all I'm resigned now pretty much on the fact that I get not this call and will not in fact also discuss how some members of staff there myself and the day my wife turning what was supposed to be one of the highlights of our stay in London in one of the low points.

    I talked to a representative of the online customer service which was fantastic, although itself also agreed that realistic, my chances are slim to a call back that he was however able to seize a member of the business team that supposedly spent on the information of countless previous officials do not have in the hope of a return call We'll see if it succeeded or not - I doubt that very much.

    So I'll now emailing this email to all the world that I can at Apple, to raise awareness on the fact that your ship called the flag shop in London (while the street regent is under renovation) has not only some very few poor staffing but also issues clearly a massive communication issues. I have to wonder how the store works effectively in this management, I myself am a branch manager and would like to know of all these questions should they arise and also to know the importance of the Dodge don't no calls - or even potentially conflicting ones. Clearly here, it is not the case, and as such I have to say that I will never to set foot in this store again.

    You do not discuss Apple here. This is a user to user support site, and your long message falls on deaf ears. To inform Apple that you are disappointed by something, use their site here, http://www.apple.com/feedback comments

Maybe you are looking for

  • How can I get my laptop repaired?

    I saved my fault with Toshiba, warranty, they recorded this as a problem and he went on a third person, but can't do so to answer my emails?Who can email within Toshiba in this regard? How to make someone to repair my laptop 3 month old?

  • How to install the new HDD on Satellite M70?

    Hi, I have a Satellite M70 PSM75E, I want to move a hard drive of 250 GB, can give me instructions how to install and what type of disk HARD inface do I go?Your help is appreciated

  • HP 110 mini book requested for password on the switch on

    Anyone can help with my problem. I am asked to enter a password when that I start my notebook 110 hp. Thank you pfindla

  • ACS 5.3 - suffix stripping by PEAP (MS-Chapv2)

    Is it possible strip the suffix on clients running PEAP (MS-CHAPv2) wireless. ACS version 5.3 (patch 5) - 5-3-0-40-5 Look like ACS 5.1 does not support this - see link below https://supportforums.Cisco.com/message/3272291#3272291 Thank you C

  • General error on the display of CV - model # E910A wireless printer

    When printing, after 2 pages have been printed, I get a general error as follows: "There is a problem with the printer See the 0x610000f6 printer documentation. " I was wondering if anyone has had this problem & what to do to get rid of the message?