Property Indexes

One of the things you’ll see more of in OpenInsight 10 is the use of property Indexes when using the Get_Property and Set_Property functions.  In previous versions these have only been used with the EditTable CELLPOS property, but now you’ll find them in other places too, like the Tab Control.

For example, if you simply wish to access a single tab you can use an index with the TEXT property like so:

tabIdx = 3
tabText = get_Property( myTab, "TEXT", tabIdx )
call set_Property_Only( myTab, "TEXT", "New Text", tabIdx )

Of course, if you don’t specify an index you’ll be working with a dynamic array containing all the tab texts just like before.

Depending on the property in question it may support one or two dimensions. If the latter then the property index argument for Get_Property and Set_Property is a simple @fm-delimited array like so:

<1> Column index
<2> Row Index

The use of 2D properties has been considerably expanded for the EditTable to reduce the need to call methods like TEXT_BY_POS, or the need to set ACCESSPOS before using the BITMAP property and so on, but we’ll cover those in more detail in a future post.

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).

6 thoughts on “Property Indexes

      1. B. Cameron

        Hi Carl, My apologies in not replying sooner, I just read your comment today. Almost a year later! Guess I should log in more.
        Yes nested tab controls. I do it now in 8.x with a little program trickery. It would be nice to get rid of the tricks. 🙂

  1. Kevin Fournier

    What are your thoughts on allowing set_property’s index parameter to be used on OLE controls. Currently, we use Set_Property(TreeCtrl, “OLE.ItemText[Key]”, Value). Sometimes it gets a bit annoying to concatenate variables. Set_Property(TreeCtrl, “OLE.TreeItem”, Value, “Key”) seems clean to me.

  2. Pingback: The VALUES and VALUE properties | Building OpenInsight 10

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s