- Founder/Site Admin
- Posts: 1188
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
The good old QuickTab control does not have the feature to hide/show a tab.
You can enable/disable.
To mimic hide/show, you can delete a tab and when needed create it again at runtime.
(when you create the tab using the same name/label the previously assigned controls will be assigned again).
An example can be found here:
When you are able to use the new TabBar control, you can hide/show tabpages using:
> starts a timer, in this test simply counts to the next minute to turn itself off.
> allows yield to the PB for clicking so the timer can be cancelled before the next minute arrives.
> I check time every second for demo purposes. Could be at 5-second intervals, 1-minute, etc. And you would likely want to check hour & minute (and day?) intervals in real life. My test only 'times' to the next whole minute.
Of course, what your code does in the sample
Code: Select all
On SAM_Timer ... If nMinute >= dfnMinute OR lParam ! lParam not equal 0 because SAM_Timer sent from pbSetTimer to cancel ...
Note that time formatting likely not correct for non-US time displays. I attached both a v5.2 and v6.3 versions.
Palm Springs, California
TD info. & samples: http://www.jeffluther.net/TD/
In many or our QuickTab Windows, I've started using Tab Bars as an interface to hidden (at Run-Time) QuickTabs.
Compared to QuickTabs, I prefer the look of Tab Bars and I like that tabs in a Tab Bar can easily be hidden. However, I very much prefer the QuickTab interface for linking controls to tabs.
Best of both worlds by having QuickTabs and Tab Bars working together.
I keep the QuickTab tucked in some part of the form that is out of the way, and the height only as much as I need to read the labels on the tabs.
At run-time, the QuickTab gets hidden completely. The Tab Bar is front and center.
When a tab is selected in the Tab Bar, the numerically corresponding tab in the QuickTab is displayed. The QuickTab itself stays hidden, but all controls linked to the tab are displayed.
Before dropping new controls on the window, I comment out the Tab Bar. ( I don't like the way controls get linked to tabs in Tab Bars.)
Food for thinking. If anybody wants some code snipits, I can do some cutting and pasting later when I can sneak the time.
Who is online
Users browsing this forum: [Ccbot] and 0 guests