how to add a textBox and a TextField to a form in j2me - java-me

i want to display both TextBox and TextField on the screen at a time but i am unable to add TextBox to form. is there any way to display both of them at a time. that is textBox at the top and TextField below it. plz help me. i will be pleased if any code is given
thank u in advance

A TextBox is a Screen, not an Item, therefore you cannot add it to a Form, and there is no way to display both of these things on screen at once.
If you want to display some additional text on screen while a TextBox is active, you can use its title (via setTitle()), or you could scroll it across the top using setTicker().

I guess, you must write you own TextBox component. It must extend Canvas. And you must paint it yourself, using drawLine, drawString.

Related

How do I allow user to select, but not edit, text in an excel userform control whose width is smaller than the text?

Context
I want the user to review some selections they made earlier. So I display some text describing each selection on a separate control in a userform. Some of the text on the controls is long, extending beyond the width of the control. This is fine; I just want the user to be able to see all of the text without being able to edit it. To do this, I use textboxes that are "Locked" (i.e. not editable) but "Enabled" (i.e. selectable). This way, they can just click and either mouse-drag or arrow-key over to scroll through all the text.
Problem
The (small, aesthetic) problem is that when the user clicks in one of the textboxes, they get a blinking cursor, which is misleading as that is normally associated with an editable textbox.
Possible solutions
Ideally, there would be some way of removing the blinking cursor, while still allowing selection but not edition. However, I'm open to other alternatives that don't have to do with changing the width, or having a scrollbar (the textbox is too short to fit a scrollbar). The best alternative I have so far is changing the background color to a gray to make it slightly more clear that it's not editable.
P.S. I'm very familiar with VBA, so if that's part of the solution, I'm cool with that.
Thanks all!
I had a similar issue, and solved it by using these instructions to create a hidden textbox that the cursor automatically appeared in (invisible to the user).

Display `ControlTipText` in front of the form

I am trying to insert a tooltip for a textbox on a form.
I am using the ControlTipText property of the textbox to do it.
The tooltip text is shown behind the form. How can I move the tooltip text forward and keep it in front of the form?
I can only offer a workaround in Excel 2013. My Userform contained problematic RefEdit controls. Whenever a RefEdit control had focus all control tips appeared behind the UserForm. Switching the another control put the control tips back on top.
Have a look at PeltierTech's RefEdit Page. There may be similar problems with other controls.

How to add Listpicker to textbox in LiveCode

I want to add a list picker in Live code.When a user click on the Textbox the list picker should open with list of items.How can do that?
Be aware that your text field must be locked in order to send a "mouseUp" message, if that is how you want to show the combo box that Monte suggested. There are other ways around this, if you still want to be able to type into that field. Write back with your exact needs.
The combo box is useful because you can type right into it. If you only want options that will load data into an existing field, a popup or pulldown might be something to look into.
On the left side of the tool palette about the middle is a style of button called a combo box. I think that's what you want.

MFC Ribbon CEdit Textbox Allignment in Panel

I am trying to align two text boxes with two buttons in a panel, and I am unable to find anything about how to force positioning inside the MFC Ribbon Panels.
Here is a picture of what I have currently.
http://i.imgur.com/ofD0b.jpg (Sorry wont let me post images yet, have to link.)
The Change View Date box has the box associated with it sitting below it and the change system date box is up in the top right in the second "column" of controls. I would like to fix this so the Box with the spin controls sits next to the CHange View Date and the box without the controls sits next to Change System Date.
Thoughts? Thanks!
I think yow cannot do it.
What you can do is to put a Ribbon Separator after the Box with the spin controls and then set the property 'Center Column Vertically' on the Panel.
Hope it can help.

User control that will internally calculate how much text to show

I want to develop an user control using Windows.Forms.Label that will internally calculate how much text to show based on the current height and length of the control.
Does anybody have the solution for it.
Thanks in advance.
The simple solution would be to put a Label on your UserControl, and set it to Dock to fill. Set the label's Autosize to false.
If you want to go a step further and an ellipsis to your label, you'll need to look into Graphics.MeasureString.

Resources