By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,945 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,945 IT Pros & Developers. It's quick & easy.

ListView Weirdness in TabControl?

P: n/a
TabControl on the right side of a form with two tabs:

Tab #1 contains two subforms that show some dynamic query results.

Tab #2 contains a ListView that gets dynamically populated as the user navigates
a TreeView on the left side of the form.

The first time I load the ListView, if the tab containing it is not selected
(i.e. the ListView is not visible) the screen draws the ListView's contents in
the upper left portion of the form - outside of the TabControl, and only
partially drawn.

As soon as I flip to the other tab and back again, the ListView is drawn
properly. Subsequent loads do not provoke the problem.

I'm working around it by making sure the ListView's tab is selected the first
time I populate it....but still wondering if I'm doing something dumb...

Anybody been here?
--
PeteCresswell
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Bri
Pete,

While I haven't seen that particular weirdness, I have seen some others
with TreeViews and Tabs. The TreeView seems to react to being 'hidden'
by the Tab Control when its page isn't the one with focus. My solution
was to have the TreeView not in the Tab Page, but over it. Then I have
code in the Tab Control that makes it visible if I am on the right Tab.
It looks the same to the user, but its a bit more work for the designer.

Hope that helps.

--
Bri

(Pete Cresswell) wrote:
TabControl on the right side of a form with two tabs:

Tab #1 contains two subforms that show some dynamic query results.

Tab #2 contains a ListView that gets dynamically populated as the user navigates
a TreeView on the left side of the form.

The first time I load the ListView, if the tab containing it is not selected
(i.e. the ListView is not visible) the screen draws the ListView's contents in
the upper left portion of the form - outside of the TabControl, and only
partially drawn.

As soon as I flip to the other tab and back again, the ListView is drawn
properly. Subsequent loads do not provoke the problem.

I'm working around it by making sure the ListView's tab is selected the first
time I populate it....but still wondering if I'm doing something dumb...

Anybody been here?


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.