TabControl

G

Guest

Hello All. I am having a very strange thing happening with my control on a TabControl. I have several tabs that I show depending on what the user selects.
My controls behave differently if I show all tabs or only one.

Has anyone seen something like this before?

At design time I have all tabs and set their default properties, in Sub New I remove any tabs like this:

Dim tp As TabPage
For Each tp In Tab.TabPages
Tab.TabPages.Remove(tp)
Next

Then on the load event I add the one(s) according to flags set by the user.

It's rather obscure but I have no idea where to look!
 
M

Mick Doherty

Sorry, but what's the problem?

--
Mick Doherty
http://dotnetrix.co.uk


Hanika said:
Hello All. I am having a very strange thing happening with my control on
a TabControl. I have several tabs that I show depending on what the user
selects.
My controls behave differently if I show all tabs or only one.

Has anyone seen something like this before?

At design time I have all tabs and set their default properties, in Sub
New I remove any tabs like this:
 
H

Herfried K. Wagner [MVP]

* =?Utf-8?B?SGFuaWth?= said:
I am having a very strange thing happening with my control
on a TabControl. I have several tabs that I show depending on what the
user selects.

My controls behave differently if I show all tabs or only one.

Please be more specific :).
 
H

Herfried K. Wagner [MVP]

* =?Utf-8?B?SGFuaWth?= said:
I have several Comoboxes in a user control that I add to a TabPage.
On the form's onload event I display a specific tab or all of the tabs designed for the form.

If I display the tabpage, then the values that I assign on the
combobox text field on the is displayed. But if I display all the tabs
then the value displayed on those comboboxes is "".

OK, now it's more clear what you are talking about. I think that this
is a well-known problem with comboboxes on tabcontrols. You can set the
combobox's 'SelectedIndex' property to -1 /twice/ to clear the selection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top