invisible controls over tabControl OCX |
Post Reply |
Author | |
pxpx
Newbie Joined: 03 November 2006 Status: Offline Points: 6 |
Post Options
Thanks(0)
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 |
|
gaudetm
Senior Member Joined: 23 September 2006 Location: Canada Status: Offline Points: 134 |
Post Options
Thanks(0)
|
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
|
|
pxpx
Newbie Joined: 03 November 2006 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
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.
|
|
gaudetm
Senior Member Joined: 23 September 2006 Location: Canada Status: Offline Points: 134 |
Post Options
Thanks(0)
|
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!
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |