Text of tip/guest/space reserved on a digital editing field / password

Hi all

I am introducing the rapids/tips for the edit fields text in my application. I capture the key in the api keyChar() and therefore

  • show the cue text if the field is empty
  • hide the cue already displayed text when the first character is entered

According to me, one way to do this is to paint your index directly on the EditField.  This way, the EditField never sees.  And you can paint it in a light color to indicate clearly what is not actually entered.

Here is an example of code, note that I cut/pasted it from a working application, but changed a few things that I think are not - but it could have messed up it completely...

private BasicEditField _searchField = new BasicEditField ("", "") {}
String emptyString = "search by input characters;
Protected Sub paintBackground (Graphics g) {}
g.setBackgroundColor (0x00FFFFFF);
g.Clear ();
}
protected void paint (Graphics g) {}
oldColor int = g.getColor ();
try {}
g.setColor (0x00000000);
Test string = super.getText ();
If (test == null | test.length ())< 1="" )="">
g.setColor (0 x 00808080);
g.drawText (emptyString, 0, 0);
}
Super.Paint (g);
} {Finally
g.setColor (oldColor);
}
}
};

Tags: BlackBerry Developers

Similar Questions

  • Excluding spaces reserved Site Recovery Manager of Get - VM

    I'm trying to get information about the virtual computer both my Center Virtual primary and backup my site.  The backup site has VM and placeholders SRM.  A VM - Get returns the virtual machines and the spaces reserved.  I would only have the details of the virtual machines.  I thought that this statement would make me what I was looking for, but it returns no results.

    Get - VM | where ($_.) ExtensionData.Config.ManagedBy.Type - not "placeholderVm")

    any help on how to do this would be appreciated.

    Condition that you did not indicate a key extension customized for SRM fictional settings, you could test for the extensionKey property

    Get - VM | where {$_.} ExtensionData.Config.ManagedBy.extensionKey - notmatch 'com.vmware.vcDr'}

    An alternative is to query the DB directly, see determine the virtual machines in a stimulus package SRM using PowerShell

  • How to set text in an object, so the object expands with the text and has even space on both sides of the object in illustrator cc?

    How to set text in an object, so the object expands with the text and has even space on both sides of the object in illustrator cc?

    R,

    You can do this:

    (1) create the initial direct Type;

    (2) in the appearance palette dialog, click on add a new fill and define the color as you wish;

    (3) effect > convert to shape > Rectangle corners round/Rectangle/Ellipse and set parent > width/extra height as you wish (essentially what needs to be added to the size of the bounding box, if anything).

    After that you can change the Type and the filled area will fit as shown on the picture.

  • Difference between spaces reserved &amp; formulas

    Hello

    I used formulas. Placeholders also seems same as formulas, then what is the difference between them and what situation the spaces reserved are useful

    If you have time please let me know the difference...


    Thank you

    user13432927 wrote:
    Hello

    I used formulas. Placeholders also seems same as formulas, then what is the difference between them and what situation the spaces reserved are useful

    If you have time please let me know the difference...

    Here's the difference...
    Placeholder
    Place support column is the column where we can define the global variable and that variable is used in the columns of formula for different calculations. column support palce is a global variable of the report.

    A placeholder is a column for which you set the data type and the PL/SQL value that you set.

    You can set the value of a column in the space reserved for the following locations:

    01.the before report trigger, if the placeholder is a level of report column

    02.A report level formula column, if the placeholder is a level of report column

    03.A formula in the space booked group or group below (the value is defined once for each record in the Group)

    If we want to return multiple values according to our logic we will use place holedr column in the formula column.

    Formula column
    The formula column is used for the calculation of the logic required for the report. formula column will calculate the value based on our logic, it will return a value.
    A column of formulas makes a calculation defined by the user on an another data column (s), including the columns of the placeholder. Colums formula should not be used to set the values for the parameters.

    Hoping to understand...

    If someone answer is useful or appropriate, please mark accordingly.

  • Custom edit field - not drawing while typing of the text

    I created a custom edit field (code below), but there is no slider or text drawn while typing.

    The text appears if you click another field on the screen, but not while typing. I guess it has something to do with my method of painting, but I don't know?

    Tips for making more effective methos painting would be a bonus!

    Thank you!

    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.FontFamily;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.component.EditField;
    
    public class CustomTextField2 extends EditField {
    
        private int fieldWidth;
        private int fieldHeight;
        private int button_colour = 0xF9F9F9;
        private int text_colour = 0x666666;
        private int border_color = 0xCCCCCC;
        private Graphics graphics = null;
        public CustomTextField2(long arg0) {
            super(arg0);
            fieldWidth = Display.getWidth()-100;
            //int off = 8;
            FontFamily fFam = null;
    
            try {
                fFam = FontFamily.forName("SomeFontHere");
            }
            catch (ClassNotFoundException e) {
                e.printStackTrace();
            }  
    
            Font font = fFam.getFont(Font.PLAIN, 20);
    
            Font defaultFont = font;
            int off = 8;
            fieldHeight = defaultFont.getHeight() + off + 10;
            this.setPadding(5, 20, 5, 20);  }
    
        protected void paint(Graphics graphics) {
    
            graphics.setColor(button_colour);
            graphics.fillRect(0, 0, fieldWidth, fieldHeight);
            graphics.setColor(border_color);
            graphics.drawRect(0, 0, fieldWidth, fieldHeight);
            graphics.setColor(text_colour);
            graphics.drawText(this.getText(),20,10/2);               super.paint(this.graphics);
        }
    
        protected void onFocus(int direction) {
    
            button_colour = 0xF9F9F9;
            text_colour = 0x666666;
            border_color = 0x3598CC;
            this.invalidate();
        }
    
        protected void onUnfocus() {
    
            button_colour = 0xF9F9F9;
            text_colour = 0x666666;
            border_color = 0xCCCCCC;
            this.invalidate();
        }
    
        protected void drawFocus(Graphics graphics, boolean on) {
    
              super.drawFocus(graphics, on);
        }
    
        protected void fieldChangeNotify(int context)
        {
            try {
    
            this.getChangeListener().fieldChanged(this, context);
    
            }
            catch (Exception e){
    
            }
        }
    
        public int getPreferredHeight() {
    
            return fieldHeight;
        }
    
        public int getPreferredWidth() {
    
            return fieldWidth;
        }
    
        protected void layout(int arg0, int arg1) {
    
            setExtent(getPreferredWidth(), getPreferredHeight());
        }
    }
    

    I just posted a code in another thread - he does most, if not all, of what you want. Take a look:

    Custom elegant EditField (textbox)

  • can someone tell me how to disable the guest account. I do not have the password and the administrator. my pc is vista Home premium

    can someone tell me how to disable the guest account. I do not have the password and the administrator. my pc is vista Home premium

    Hello

    Enable or disable the guest account the
    http://Windows.Microsoft.com/en-us/Windows-Vista/turn-the-guest-account-on-or-off

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • How to paste text in ANY editable field (e-mail, sms, browser, contacts address bar / any other application)

    Hello

    Can anyone help me please with the following questions:

    1. once I have add a menu item to help

    ApplicationMenuItemRepository.getInstance().addMenuItem(ApplicationMenuItemRepository.MENUITEM_SYSTEM, myMenuItem);
    

    I am able to access an instance of net.rim.blackberry.api.mail.Message (when I'm in the e-mail editing mode) and put the content in the subject / body of the email, but it was mostly a proof of concept for me.

    What I really want to be able to do, it's automatically access the instance of any editable field in any (RIM / part 3) app that the user cursor is now. When the focus is on something that is not editable, then my menu item should not appear in the menu.

    In addition, it is important for me to know exactly where the cursor is. For example if the cursor is in the middle of the text, then I want that my extraordinary paste paste of stuff there. The same for the selected text - it needs to be replaced.

    Basically I want my menu Paste Special feature works exactly like 'Stick', unless I want to offer which should be pasted.

    2. Apart from curiosity, what are we supposed to go back to the

    public Object run(Object context)
    

    method? For now, I'm doing my treatment based on the type of control context and make the treatment on it and everything just return null (which works well), but I don't know I'm on some features.

    Never done this, but looking at the API and remembering what simon_hain said when asked a similar question, I think it goes like:

    You can get help from the active screen

    UiApplication.getUiApplication () .getActiveScreen ();

    You can get the Menu for a screen to help

    . getMenu();

    You can browse the menu for help

    . getItem()

    for

    . getSize()

    entries.

    I think that 'toString' will give you the message, then

    . Run()

    to run it.

  • Get the text in the Edit field

    Hello

    In my Application, I add a check box and a label field and a field change a grid field Manager. Then this network domain manager, I add several times in Vertical field Manager. So it's looking like list of items. Now, when I checked the box five, trying to get the text of the corresponding edit field.

    This is the code for the domain network manager:

    int c[] = {screenWidth/6, (screenWidth)/3, (screenWidth)/2};
            gm = new GridFieldManager(c, Manager.VERTICAL_SCROLL);
            Logger.out("Grocery", "Here it is coming"+i);
            cbfChecked = new CustomCheckBoxField();
            cbfChecked.setChangeListener(new FieldChangeListener()
            {
                public void fieldChanged(Field field, int context)
                {
                    if(checked[i] == false)
                    {
                        checked[i] = true;
                    }
                    else if(checked[i] ==  true)
                    {
                        checked[i] = false;
                        Logger.out("Grocery", "It is UnChecked" +checked[i]);
                    }
                }
            });
            gm.add(cbfChecked);
            Logger.out("Grocery", "Adding first Label Field");
            LabelFieldCustom lfFrom = new LabelFieldCustom((String) m_vtrItems.elementAt(i),Color.BROWN,FONT_FAMILY_0_SF_AS_16,Field.FIELD_LEFT);
            gm.add(lfFrom);
            Logger.out("Grocery", "Adding second Label Field");
            efcAmount = new EditFieldCustom(Bitmap.getBitmapResource("dob_text_box.png"), 25);
            efcAmount.setMargin(new XYEdges(30, 0, 0, 0));
            gm.add(efcAmount);
            return gm;
    

    Here I add the grid domain manager several times:

    for (int i = 0;i < m_vtrItems.size();i++)
            {
    
                vfm.add(getRow(i));
                vfm.add(new SeparatorField(SeparatorField.NON_FOCUSABLE));
    
            }
    

    Here is the snapshot of my screen:

    Please help me.

    You can access the field by index (prone to errors if).
    or you could save your fields in a data structure, such as a hash table, with the checkboxfield as key to the editfield as value.
    or...

  • text of space reserved and box-sizing: border-box

    Hey guys,.

    I'm on a mac (10.9.3) under FireFox 30.

    I have the old * {box-sizing: border-box ;} thing put in place on my page.} In doing so, my input placeholder text appears, but not in Chrome and Safari.

    When I replace the box numbers on the input to the content box, the placeholder text is displayed.

    I probably wouldn't share the url, but here, you're going to: http://bluescape.jacobdubail.com/ click on search in the nav link to view the entry.

    Thank you
    Jacob

    This entry has a rule of departure of height: 0px.

    When you click the search button, the height remains at zero with box -: border to resize-box but becomes 20px with box-sizing: content-box.

    Is it because zero height is not allowed with content-box or because the script does something different in the two cases? Hmm...

  • How to use the text space reserved Point of insertion properly?

    My problem is double here, and there may be a response that connects these two problems...

    1. when I add a text field on stage and do a right click on this text field, I can't add a Point of Insertion in order to display the placeholder text

    2. when I add a subform on stage, I can then add a Point of Insertion in the subform, but when I Preview in PDF or save this document in PDF format and click on the text in support of place that it does not go far.  She stayed there.


    What Miss me to have placeholder text disappear once a user clicks on it?


    Thank you

    I discovered that my concern was not with the insertion points, but with putting shaped on a text field in the object Panel.  Now I can display placeholder text, which will then disappear once typed by the user in the field.

  • French layout of the text and non-breaking space

    Please PLEASE! Can someone tell me how to find a set of grep or script to check all the punctuation in french?

    I do speak french at all and for me is really (really) a lot of time to verify if all the text that my company gave me the right text formatting.

    We have a lot of years translated user manuals there is inside our company and without space between punctuation right. The problem is that, in the same document, I have some parts of the text by a professional translator with all the right spaces and other parts without any extra space...

    Here, someone had the same problem?

    I know there are some grep for this problem, but they look to a symbol at a time and do not recognize where the punctuation is already correct. Or at least those that I could find...

    This script search - replace is suitable for the French typographic rules:

    http://abracadabrapdf.NET/utilitaires/utilitaires-InDesign/InDesign-jsfindchangelist-en-ve broad-French.

  • How to make text wrap in 3d space

    I have a donut on his side in 3d on a table. I want my text to wrap around it, so it gets again on both sides. I tried cc bendit, bend, bow, everything seems to bend it in a smile. I need to fold in the space of zed... It is probably simple that I just can't understand it... Thanks for any help

    1. Create a text layer with your text
    2. Add a circular mask for the text layer
    3. The value of the mask none
    4. Set path Options to the path 1
    5. Make the layer 3D text
    6. Since the menu animate Enable 3D perCharacter
    7. Add a rotation animation
    8. Rotate the facilitator 1 X 90 ° rotation
    9. Rotate the text of layer - 90º x
    10. Refine the rotation of a text layer X transform property to match the perspective of the shot
    11. Adjust the baseline shift or the size of the mask to adjust the position of the text
    12. Adjust the position

    It looks like this:

  • Color apex 4.2 issue 26 theme space reserved

    The problem is in Firefox 17, the placeholder color is too dark in color and very difficult to distinguish from a real field value.

    Find out the location of this link date field using firefox and chrome
    http://Apex.Oracle.com/pls/Apex/f?p=67147:2

    Color Chrome 23 is perfect.

    Is it a browser issue or a theme issue?

    PC8888 wrote:
    The problem is in Firefox 17, the placeholder color is too dark in color and very difficult to distinguish from a real field value.

    Find out the location of this link date field using firefox and chrome
    http://Apex.Oracle.com/pls/Apex/f?p=67147:2

    Color Chrome 23 is perfect.

    Is it a browser issue or a theme issue?

    It is a decision of implementation in Firefox. You need to add a CSS rule for the style of the text placeholder in Firefox:

    input:-moz-placeholder {
        color: #a8a8a8 !important;
    } 
    
  • Click on the thumbnail and load enlarge them the image in another space reserved

    Is it possible to click on a small image to load a larger image and another one in a placeholder adjacent image without using a flash object.

    I tried _parant, _self and _top, _blank without success targets.

    If this can be done without flash, please give me some advice or point me in the right direction.

    I use CS3.

    Thank you

    Barrie

    Here's a simple option

    http://DreamweaverResources.com/tutorials/set-text-of-layer/

  • text selection tips

    Is there a way to select text, then jump text in indesign CS1, and select text without getting what is between the two selections?

    Thank you

    brand

    N °

    Bob

Maybe you are looking for