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).
Hey Carl – nice! Any thought to having tabs on tabs?
Hi Bruce – Not sure what you mean by “tabs on tabs” You mean nesting tab controls?
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. 🙂
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.
Hi Kevin, I think that’s a good idea – I’ll take a look at it.
Pingback: The VALUES and VALUE properties | Building OpenInsight 10