Announcement

Collapse
No announcement yet.

get id of touched button via the IDE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • funkyjay
    replied


    oh thanks. now i feel stupid

    i was using the i+objectname already for the img_Disable() function but i did not realize that you can use the objectname identifier also for if - querys, etc

    HTML Code:
     n := img_Touched(hndl, -1);//scan image list, looking for a touch
     if (n == ibStart 
       select_screen( SCREEN_STARTUP 
       .
       .
       .
    is working fine

    Leave a comment:


  • ESPsupport
    replied


    Are you writing a ViSi program, or using ViSi to generate objects for serial?

    If it's the former the indexes are generated for you, it's the object name with an 'i' prepended to it.

    If it's the later look in the (generated) programnameconst.inc file, here's the relevant part of it for the AniButton ViSi example.

    // object indexes into ImageControl
    #CONST
    iAnibutton1 // offset 0x0
    iAnibutton2 // offset 0x32000
    #END

    so the index of AniButton1 is 0, AniButton2 is 1 as the constants are enumerated.

    Leave a comment:


  • funkyjay
    started a topic get id of touched button via the IDE

    get id of touched button via the IDE

    Hi,

    currently i'm using

    HTML Code:
    n := img_Touched(hndl, -1);
    to retrieve the id of a touched button.

    Is there any way to see which button has which id in the IDE? At the moment i get the ids by try&error. Press each button and remember the id it returns to access it via sourcecode. I did not see anything in the IDE to get the id in advance. Did i miss something?

    thanks,
    axel
Working...
X