How to design own graphic interface for text entry

Hello world

I use the black background in my application and I would like to create my own custom controls which looks nice on a black background.

For text input, I managed to create an entry of text with white background and black fonts. But I couldn't make the field to be a little larger than the text nor I was able to focus the State field.

Code:

public class CSTextField extends BasicEditField {}

public {CSTextField()}

Super (Field.FOCUSABLE |) Field.EDITABLE);

}

protected void paint (Graphics g) {}

g.setBackgroundColor (Color.WHITE);

g.setColor (Color.WHITE);

g.fillRoundRect (0, 0, super. getWidth(), super. getHeight(), 5, 5);

g.setColor (Color.GRAY);

g.drawRoundRect (0, 0, super. getWidth(), super. getHeight(), 5, 5);

g.setColor (Color.BLACK);

Super.paint (g);

}

}

See here: http://liechti-fotografie.ch/share/textfield.png

Do you have an idea how realize that the focus is visible and the text field seems good?

Thank you

Do not design your own text input field - build a Manager around it that meets your needs.

Here's an example of how this can be done:

A scrolling line text entry field

Read the comments - there are a few examples here on adding borders. I don't think you need boundaries, but they can give you ideas on how to position the fields in order to create some padding between the text and the surrounding black background.  You seem to be advanced enough to be able to easily change the code corresponding to your needs.

Good luck!

Tags: BlackBerry Developers

Similar Questions

  • How to design the user interface of Indesign plugin cs6?

    Design of UI to the custom help c ++ library (SDK) for pluging is a work very tedious .so when I search on the net I found that we can do to help Adobe Creative Suite Extension Builder but I don't know how to use it to develop the user interface for the plugin and how to enable the management of events in this UI. I read a lot of document about it on the net, but they have all created a lot of confusion in my mind if someone can help me to know the steps I have to follow to develop the plugin using the this or whatever technology (action script, JavaScript etc)

    If you want to develop using Creative Suite Extension builder Extensions so I think that this is not the right forum for you. Thanks for posting your specific queries on the below mentioned link hotel

    http://forums.Adobe.com/community/creativesuites/cs_sdk

    To give a brief of how to develop the interface using JS ScriptUI user allows you to develop your user interface, it's a quick and an OS-independent approach to the development of the user interface. The user interface created using JS comes next. You can see the following link for more help on ScriptUI

    http://www.kahrel.plus.com/InDesign/scriptui.html

    I did not much info about the development of the CS SDK, but I can point you to one direction more than the dev called hybrid plugins that the user interface is created in CS SDK and appropriate methods are exposed plugin C++ (improve the script object model) to be called by the code CS for too and for communication between these two modules of code.

    Hope these pointer help you get started.

    Thank you

    -Manan

  • How gray on Intel Graphic Media for local users?

    does anyone know how to gray on the options to prevent users, change the graphics options from Intel graphics media for Mobile?
    So if anyone knows what's different in the BIOS updates, any possibility to cancel boot devices (not only change the order)

    Hello

    You can create a limited user account, but I n t think that this option disables the function to change the graphics options.

  • How do you manage virtual interfaces for Macbbok

    How do you manage virtual faces for macbook pro?

    I guess that you are referring to the virtual faces on a network?

    System Preferences > network > gear icon > manage virtual faces

  • Can I integrate results of box for text entry in Quiz summary of results?

    Hi, I am the course design and have started using a combination of slides of Quiz and areas of text on the other slides. I realize that the Quiz slides provide a score overall and summary but I also incorporate the results from the text entry areas in this summary. Thank you, Sonia

    Hello Sonia,.

    You did not mention the used CP version, which makes it normally easier to answer your questions.

    It is possible to mark text entry areas (as is the case for all interactive objects such as click boxes, buttons etc.). You can then add these scores to the total score. Take a look at the view of Advanced Interaction (Project menu): I insert an image with the framework of a project, quiz slides and interactions with score added to the total:

    The score for the ETB and the option 'Add to the Total' lie in the properties of the ETB, reports tab.

    This on the partition. But what do you mean with "Summary"? The score will be available on the LMS, if you do reporting of interactions too, you will have a detailed list of these interactions. But maybe you want something else?

    Lilybiri

  • immediate property for text entry

    Dear all

    I tried several times for the immediate meaning = true & immediate = false for text input component, I read more about it in oracle doc, but I can't see the difference in my application?

    a help to know what is the difference in a simple way?

    Thank you

    For example,.

    You want when you put a value in this field, you have to call a method with the valueChangeProperty. But, if you put a value not valid (imagine there is a validation in this area), the valueChangeProperty will not be raised. In this case, if you put immediate = "true", the valueChangeProperty will be drawn, because the validation has been bypassed.

    Kind regards

  • How to connect computer lane ina for data entry work

    I want to connect computer in my office for data entry so culd anyone help me to solve this

    Narendra salvation,

    You can ask your question in the TechNet Forums: http://social.technet.microsoft.com/Forums/en-US/home

    Thank you.

  • How necessary is a graphics card for Horizon view?

    I wonder how important it really is to a graphics card help with graphics using Horizon. None of my clients will use intensive graphics, such as games or CAD software. That said, the experience will be good as an experience of laptop to customers, with no particular graphic but things are ok in all?

    This is not necessary unless you have specific needs for 3D applications and 3D rendering.

    Even without and GPU:s, you can provide features basic coated CPU software with 3D.

    Linjo

  • How to configure the graphic Styles for images in a gallery?

    Hello!

    I'm working on galleries with many images. The idea was to set up the first tile / image, and then save these settings in the graphic Styles, like for example a graphic Style "Gallery_Image_292_292_px" Panel, so I could assigns these parameters of dimensions with a single click on the other images in the gallery.

    But it seems that the graphic Style is not catch width and height of the image. I have missed something, and how can I make sure it's also includes these settings?

    Advice would be much appreciated

    G

    Graphic styles do not store the dimensions it would really limit their use. You could save your template image in the library that keeps all the settings. All you have to do is make drag an instance of the page and replace the image.

    David

  • How to implement a graphical interface

    To implement my GUI, I did:
    public class Gui extends MyClass{
    Is this a good practice? MyClass is a controller that controls the machines. So I figure it makes sense to use inheritance because the GUI is also a controller for the same machines.

    But in the word GUI, 'I' means Interface. This means that a GUI must be an interface that is implemented by MyClass?

    What is the best practice or rule to follow?

    SquareBox wrote:
    To implement my GUI, I did:

    public class Gui extends MyClass{
    

    Is this a good practice? MyClass is a controller that controls the machines. So I figure it makes sense to use inheritance because the GUI is also a controller for the same machines.

    If you talk about 'Controller' as in the 'C' in 'MVC', then no, the user interface is not that. It is point of view. The only case in which the user interface should extend antyhing is if she extends a (proabably summary) class that defines some of the options view, and this particular interface is just a way of presenting, while, for example, some CommandLineInterface could be an another subclass that implements these features in a textual manner.

    You don't generally range from concrete classes, and if you do, it is only to provide behavior specialized on certain methods. As a general rule, [url http://www.google.com/search?q=prefer+composition+to+inheritance] prefer composition over inheritance.

    You certainly not inherit just to share the code.

    But in the word GUI, 'I' means Interface. This means that a GUI must be an interface that is implemented by MyClass?

    Yes and no. The "Interface" in "GUI" has nothing to do with the interfaces of the Java language itself. It is a 'user interface' - in other words, how your application interacts with the user. The term predates Java. However, it would not be of the never seen to set an interface that specifies the operations that is responsible for the user interface of your application. Note, however, that implements an interface is no different from one that extends an abstract class. In both cases, you provide concrete implementations for a set operation.

  • How to design a Web page for kids...

    I want to design a site directed to children, but what use little or no cartoons. Someone has ideas on how achieve and still generate interest with children?

    Here is a great link that was recently posted on the GL forums for a page for
    children which I think is prototypical.

    http://junior.Bachmann.co.UK/

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "loosestring" wrote in message
    News:ebq8s5$r0$1@forums. Macromedia.com...
    > I want to design a site directed to children, but is - that use little or no
    > cartoons. Anyone has any ideas on how to do this and still
    > interest with children?

  • How can I add a button for text Style/Bar?

    Is it possible that I can add a button for Style/bar text in the composition window, next to the B, I, and U? System shortcut Mac did not: it appears the menu shortcut ("order /' ') & the menu flashes as if it works, but it's not.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/extra-format-buttons/?src=HP-DL-upandcoming

  • How to design the user interface

    Hey forumers.

    IM new to BB development and I would like to make a main page in a header, content and footer. What controls are suitable for this?

    Thank you.

    Set aside a few hours and take a good read through the documentation for Creating of User Interfaces . There are some very good tips and stuff in there.

  • How to set up a shortcut for Text Edit Box

    I search online. When I find an article or a book, I need to add a text box for the PDF article saved with the URL of the Web site and the date it was consulted.

    Whenever I do this, it always comes with the Minion Pro text font, size of text in the 14 and the red text.

    I want to use the same text font, size and color - Times New Roman, 9, red.

    Whenever I hand on an article, I have to spend 2 minutes change the 3 categories. There must be a shortcut to save time, energy and frustration. Could someone help me please?

    I use a MacBook Pro and have the version of Acrobat to 2015 of the DC Pro (ongoing).

    Thank you.

    Ron

    Do not use the tool to add text to the title of the editing of content. Use the comment tool instead add text (under the comment Panel). Then you will be able to define the default appearance settings.

  • How to use a keyboard shortcut for text bold/underline instead of bookmarking/addition of grid using the same control keys?

    Hi people,

    I'm using Ctrl + B to "BOLD" text in my document; but he chooses randomly between the text in bold vs bookmarking page... it gets really annoying. How can I disable bookmarking page by using Ctrl + B? I'm trying just to bold text... I don't care about bookmarking

    I also try to highlight the text using Ctrl + U; He noted sometimes and other times, shows a grid on the page. How prevents having these contradictory effects by using the same command?

    S

    I use Windows 8.1, acrobat pro DC

    This happens when you use comment tools and simultaneously editing tools in the same session.

    Workaround: Do not use the comment tools when editing. Wrap with Assembly before moving to comment.

Maybe you are looking for