Command in LWUIT - java-me

How to add more than 2 command in a single row in at the Footer in lwuit Form ,suppose I want to add Back,Select,and Exit Command in a single row,how can I do that? Help with some example.

Use Display.getInstance().setThirdSoftButton(true); for showing three softbutton's.

You can also write your_Form.setDefaultCommand(the_command_in_the_middle);

I noticed that setting commandBehaviour to SoftKey in the resource editor makes all your commands align on one side, typical blackberry behaviour, works on nokia also. It is a property of one of the constants of the theme in the resource editor.

Related

How to restore Sublime 3 to the restore single-window mode?

I am using Sublime 3 but I am a newbie. I was trying to define some preferences, like the font size. However, I messed up things and I am not being able to restore.
Currently, I have this two windows "dashboard":
How can I restore it to the default one-window view?
I tried to look for things over the preference menu, but checking/unchecking all the available options did not help me to solve this problem.
It looks like you added an extra column. Try going to View, then setting Layout to Single or use the keyboard shortcut: Shift+Alt+1.
If you used File/Split View, setting single column mode won't work. In this case I found you can just click on another tab and the split will go away. Not at all intuitive.

Show only 2 commands in the menu bar in Lwuit or Native J2ME

I added 2 commands to my form in lwuit.
form.addCommand(test);
form.setBackCommand(exitCommand);
I changed the command behavior to COMMAND_BEHAVIOR_NATIVE, so i can show the status, and my commands appear at the bottom too, but they appear exit at the right ..and test Command in the middle.
I want to show only 2 commands layout in the menu bar, Exit on the right and options list that contains test on the left.
How can i do that?
First get the back Command and remove it. After this, add the exit Command like a standard Commandwith addCommand. Try this, if this doesn´t work we can try something else.
I don't know about LWUIT since I've never used it, but with native JavaME you sadly have no control of this. It is the individual device that decides where to place the commands.
You can move them around by changing the priority parameter, and you may be able to achieve an acceptable result that way, but only on some devices. The same code will give a different result on other devices.

how to show hidden files using j2me LWUIT api

I'm making a FileBrowser using LWUIT.
The problem is when I hide a file using setHidden(true) the application can never display it
any more using the listfiles() so I can't unhide it.
This seems to be an omission in LWUIT4IO. I fixed it in Codename One so it should work as expected there.

Lwuit on nokia. Setting a command to the game fire key

This may seem trivial, but i'm working on a project to be deployed exclusively on nokia phones, and all i want is to create a command and set it to the "GAME_FIRE" center key. For some reason, when adding lwuit commands, LWUIT skips the game fire key, and instead creates a defaut menu command that then shows the added commands. Please help.
As far as I understand, LWUIT never uses the center key to commands. It wont event let you have two menus,it will always use one soft key for the main (the first) command, and all the other commands will be on a menu in the other soft button
Use
Display.getInstance().setThirdSoftButton(true);
This will set the label on the fire key as well.

How to add text to "edit box" control in visual studio 2005

I want to add some text on a dialog in VS 2005. I have installed Microsoft SDK on my system.
The text which I want to add is very big, it runs upto 4 pages.
So I decided to add edit control with scrollbar, which I am not able to do.
I tried adding through string table, but formatting was not maintained.
Plz let me know, how to show a formatted text upto 4 pages on a dialog.
My application is non MFC application.
Thanks in advance
Vinayaka Karjigi
The edit control has a hard limit of 65k worth of text. You may be running into that. Try a rich edit control.
Have you tried to set the MultiLine attribute of your edit control?
Have you tried manually adding "\r\n" for next line or "\t" for tab in the string buffer. That may do the trick.
Update: Say you want to break the text in two lines TCHAR szEditBoxBuffer[] = TEXT("Hello\r\nWorld"); may do the trick. For tabs TCHAR szEditBoxBuffer[] = TEXT("Hello\tWorld"); This is tedious but this is what i could think of.

Resources