×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    4

    CustomItem disable traversal - don't make it even selectable

    I've got a CustomItem which is embedded in a Form.

    This CustomItem simply draws some text, so I don't want to have this CustomItem clickable/selectable by the user.

    StringItems have a boolean skipTraverse + shouldSkipTraverse, which seems to implement this behaviour. It seems this isn't universal - simply adding those booleans to my CustomItem doesn't help.

    Any ideas?

    "The CustomItem need not support internal traversal at all. It can do this by returning false to the initial call to the traverse method. (This is the default behavior if this method hasn't been overridden by the CustomItem.) If this occurs, the system must arrange for the user to be able to traverse onto and past this item. The system must also arrange for proper scrolling to take place, particularly if the item exceeds the height of the screen, regardless of whether internal traversal is occurring."

    protected boolean traverse(int dir,
    int viewportWidth,
    int viewportHeight,
    int[] visRect_inout) {
    return false;
    }

    Still lets me click this item on a Nokia phone.


    Passing super(null); in the constructor seemed to help a bit - it sets the label of the item to null. The item is still selectable, but then has a different look - maybe I'm getting closer.

  2. #2
    Registered User
    Join Date
    May 2011
    Posts
    7

    Re: CustomItem disable traversal - don't make it even selectable

    I am solving the same problem. How can I make CustomItem that will not be selectable(traversable...) - will behave the same way as StringItem does?...

Similar Threads

  1. CustomItem - Should not be selectable / No traversal
    By JasperGoes in forum Mobile Java General
    Replies: 0
    Last Post: 2011-04-26, 09:39
  2. CustomItem traversal on MIDP Form - bug?
    By mbetan in forum Mobile Java General
    Replies: 8
    Last Post: 2008-12-02, 17:43
  3. E90 specific CustomItem traversal problems
    By jimmi1977 in forum Mobile Java General
    Replies: 0
    Last Post: 2008-01-04, 16:10
  4. CustomItem traversal
    By charlesvc in forum Mobile Java General
    Replies: 0
    Last Post: 2007-10-12, 12:26
  5. CustomItem internal traversal
    By charlesvc in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2007-10-11, 16:18

Posting Permissions

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