Search code examples
user-interfaceactivexopenedgeprogress-4gltabpage

How does OpenEdge Progress-4GL work with ActiveX tabstrip component?


I would like to work with a tabstrip in my OpenEdge Progress-4GL environment, but I can't make it work.

"No problem: there's an example on the Progress website.", you might say, and indeed on this URL there's an example of a tabstrip (you might need to download the mentioned "TabStrip_sample.zip"), where a Listview is placed on one of the tabs and a Treeview on the other tab. (Don't be afraid: the zipfile only contains source code, bitmaps and an automatically created *.wrx file, which won't harm your computer)

Now the question: how on Earth did they do it?

Into the file "dbtest.w" let's have a look at both tabs at design time (after having resized the Listview): enter image description here

It is clear that all components are put on the TabStrip component, so the linking between the tabs and the components should be done at runtime (just as mentioned in the URL), but here's the catch:

There seems not to be any event handler ON ... CFTabStrip or anything in the code.
The keys ("Db_tbl" and "Db_sch") NOR the indexes (1 and 2) of the individual tab pages, mentioned in CFTabStrip's property editor, are nowhere to be seen in the code.

Can anyone explain me how they did it?
Thanks in advance


Solution

  • The "magic" is in PROCEDURE CFTabStrip.TabStrip.MouseDown, which checks if the horizontal location (x) would have meant the first tab or the right tab and then hides / shows one or the other.

    Pretty clunky, but if you look at the header, this example was created nearly twenty years ago to work with Progress 8.