Searching for idea concerning qcktabs

Discussion forum about all things Team Developer 7.x
wilhelm
Germany
Posts: 191
Joined: 22 Mar 2017, 08:49
Location: Cologne

Searching for idea concerning qcktabs

Post by wilhelm » 24 Jan 2018, 09:25

Hi,

I am searching for a way to determine if a certain control is visible or not, indepentent if it sits on an hidden tab or not.
Can anyone help with that? I need a way to distinguish between sitting on a hidden tab and being totally invisible.
Any ideas would be highly appreciated.
TIA
Wilhelm

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1112
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Searching for idea concerning qcktabs

Post by Dave Rabelink » 25 Jan 2018, 09:25

Using this WIKI article, you are able to traverse the TabBar pages and childs.

http://wiki.tdcommunity.net/index.php/Tabbar

Using SalTabGetActivePage you know which page is enabled, meaning all childs on other pages are not visible.
Using SalTabGetPageWindow you have window handle of a page. Getting the parent of a child and checking against the page window handles, you know which child objects are on which page.
Each object can also be checked using SalIsWindowVisible.

Maybe you could explain the context in which you need this functionality to better determine what you actually need.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

wilhelm
Germany
Posts: 191
Joined: 22 Mar 2017, 08:49
Location: Cologne

Searching for idea concerning qcktabs

Post by wilhelm » 25 Jan 2018, 12:24

Thanks Dave,

so I will try to explain: I have a baseclass for Childtables and Columns which saves and restores sizes and positions. This baseclass should not save or restore positions and sizes of hidden objects.
What I am trying to determine, is wether an object is hidden at design time or not. At the moment I use SalOutlineItemTypeText( SalOutlineCurrent( ), SalOutlineItemOfWindow( hWnd ), CDK_IT_Visible, FALSE, sVisibleYesNo) to determine that.
Unfortunately there doesn't seem to be a way to distinguish between hidden controls and controls that are simply put on a tab that is initially in the backgound and shown when the tab is activated.
So basically I want to know if the control is never shown or simply at a later time.

Cheers
Wilhelm

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1112
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Searching for idea concerning qcktabs

Post by Dave Rabelink » 26 Jan 2018, 07:07

I'm sorry, I did not see that you are referring to QckTabs.

The attached sample checks for each child object on which tab (page) it resides on.
A child object is hidden when it is on a non-active tabpage AND it is not also a child of the active tabpage.

The sample displays for each tabpage which childs are on it and also if it is hidden/visible.
When changing the tabpages, this info is updated so you can see that the hidden/visible state is toggled depending on which tabpage is active or not.

Hope this can be of help.

QckTabs_CheckChildOnPage_TD21.zip
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests