Tab Controls and UserData

Help
2012-09-04
2012-09-08
  • Staffan Tylen

    Staffan Tylen - 2012-09-04

    In my quest to conquer the task to write ooRexx dialogs I've come across the Tab Control addFullSeq, insert and modify methods, which let you include "any object the programmer wants to store with the tab". That's great, but I can't find a way to retrieve this information again. What am I missing?
    Thanks in advance.
    Staffan

     
  • Mark Miesfeld

    Mark Miesfeld - 2012-09-08

    Hi Steffan,

    For some reason I didn't get a notice when you posted this, otherwise I would have answered sooner.

    The way to get the object back is through the itemInfo() method of the tab class. This will return a stem with the indexes:

    stm.!TEXT
    stm.!IMAGE
    stm.!PARAM

    The !PARAM index will contain the object you stored with the tab. The doc says "an integer value" but that is not correct. It is any object you stored.

    I've gone through and updated a lot of the ooDialog documentation, but haven't got to all of the section on the Tab control.

    This is a very useful feature, glad to see someone is thinking about using it. The tab control class will be updated in the future to bring it up to Windows 7 levels and there will be some added methods to set and get this value directly. Probably setItemData() and getItemData() to match the naming of the similar methods for the list-view control.

    --
    Mark Miesfeld

     
  • Staffan Tylen

    Staffan Tylen - 2012-09-08

    Thanks for your feedback, Mike. I have been looking at itemInfo but the integer value of course put me off. I'm glad that I can use it though because I see it as a good way to encapsulate tab data. It's a new world compared to using Rexx under TSO :)
    Staffan

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks