Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / December 2004

Tip: Looking for answers? Try searching our database.

TreeView weird focus problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Ignacio Gelos - 28 Dec 2004 19:09 GMT
Hi,

   I'm having some problems HIDING a TreeView. The control is 'hosted' in a
TopLevel Form that is displayed as a  drop-down window for a control,
following the pattern at:
http://www.vbaccelerator.com/home/NET/Code/Controls/Popup_Windows/Popup_Windows/
article.asp


   However, when the drop-down Form is hidden (with .Hide(), not destroyed)
on the AfterSelect handler, the main form doesn't activate, and the title
changes to inactive. It looks like a hidden window is holding the focus.
I've tried treeView.Hide(), mainForm.Activate(), etc. etc., but somehow the
main form manages to remain inactive.

   Any work-arounds?

Thanks in advance,
Juan
Juan Ignacio Gelos - 28 Dec 2004 19:56 GMT
I found a work-around: just before hiding the drop-down form that contains
the treeView, I disable it (treeView.Enabled = false;)... it works like a
charm.
Someone should take note of this bug somewhere...

Cheers,
Juan

> Hi,
>
>     I'm having some problems HIDING a TreeView. The control is 'hosted' in a
> TopLevel Form that is displayed as a  drop-down window for a control,
> following the pattern at:

http://www.vbaccelerator.com/home/NET/Code/Controls/Popup_Windows/Popup_Windows/
article.asp


>     However, when the drop-down Form is hidden (with .Hide(), not destroyed)
> on the AfterSelect handler, the main form doesn't activate, and the title
[quoted text clipped - 6 lines]
> Thanks in advance,
> Juan

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.