×

Discussion Board

Results 1 to 3 of 3

Thread: addCommand

  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rome, Italy
    Posts
    53

    addCommand

    Hi everyone
    i've just added a command to my canvas, but i want that this command is show on the right of the screen...but it is added on the left as a subcommand of the main group "Options"...how can i correct this?
    thanks in advance
    Marco

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    1

    I'm not sure if this is the right way of doing this but...

    When you add a user defind command (SCREEN) it adds it to the right. This means that the user can only select one command for the current screen, the other button is usually left for back and exit commands.

    How ever if you use the EXIT or BACK command type and use your own button name and command function this will get round it.

    I don't have the code I used with me so it's a bit hard to explain but if you declare both commands in the same way but change the type of the first on to EXIT it should work when you add them.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    26
    Hi,

    i had the same problem for the Nokia 7650 and 3650. Nokia 7650/3650 adds the exit command per default to the left bottom of the canvas, so if you use Command.OK for your command, there will be an option list on the left. Use Command.BACK instead of it, and do not declare an Exit-Command for the Nokia 7650/3650.
    Here is a code example:
    Code:
    startCommand = new Command("Start!",Command.BACK,1);
    ....
    ....
    public void commandAction(Command c, Displayable s) {
    if (c== yourCommand){
    .....}
    else if (c== startCommand) {
            yourFunctionHere();
         }
    }
    Hope this will help.
    Last edited by Elwoodini; 2003-04-11 at 00:31.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •