invisible controls over tabControl OCX
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5780
Printed Date: 17 November 2024 at 3:49am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: invisible controls over tabControl OCX
Posted By: pxpx
Subject: invisible controls over tabControl OCX
Date Posted: 13 December 2006 at 9:35am
Hi everyone,
let's see what happens with this new vb6 exe project:
- add on the form a tabControl with 2 tabs (no properties modified)
- on 2nd tab add two commandbutton
- command1 code: command2.visible = not command2.visible
now press F5. It happens that, when you click the 2nd tab, both commndbuttons appear (OK!)... then i click the 1st commandbutton. the 2nd disappears (OK!). BUT, if i go to the 1st tab and back to the 2nd, both commandbuttons appear (WRONG!).
what's the deal? we used this in our configuration form. we have solved it by placing a label and a textbox (the controls that must be hidden) inside a picturebox with no border, and hiding them (not the picturebox). looks like only the first level of child controls is put back to visible after a tab change.
i hope i've been understandable, i'm not english :)
thank you dany
|
Replies:
Posted By: gaudetm
Date Posted: 14 December 2006 at 2:52pm
always use a picturebox or a form to be child of the tab easier to manage code and best results as you can set the background color according to the theme the tab use
that not a big deal
|
Posted By: pxpx
Date Posted: 15 December 2006 at 12:41pm
Let ME decide what's a big deal. Altought you are right in some situations, this is not the case. I'll explain better: we have the configuration form that consists of 19 tabs, with about a total of 300 control (labels, textboxes, comboboxed, checkboxes, frames, pictureboxes). adding 19 picturebox would make it even slower (it is ALREADY slow: actually when i change tab i can see the flickering controls becoming visible one at time, and my machine is not a p3-800mhz...). Then, apart from speed, memory usage will increase (autoredraw = true?). I solved it this way, ok, luckily i needed it just for a couple of label+textboxes.. but this is a workaround! in the end i think this IS a bug. i was just pointing it out.
|
Posted By: gaudetm
Date Posted: 16 December 2006 at 11:48am
I got the controls number problem on my frmOptions probabely same as your's then i made a switch to separate each tab in a different form without borders and resized to the tab size then the form open instantly in a multiple thread weay in VB6! so much faster event on a P3 733Mhz with windows XP and 256 Megs RAM
no flicters at all!
|
|