473,569 Members | 3,054 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Treeview control

Hello All,

I would like to have a TreeView control on a form that autohides when the
mouse leaves the area of the control, much like the Toolbox window in the
VB.Net IDE. I have searched MSDN, but came up unsuccessful, any help will
be greatly appreciated.

--
Thank you,

Anthony
Nov 19 '05 #1
2 5225
Thanks for the response. I implemented something like this earlier, and it
worked, just didn't have the clean appearance like other controls when they
autohide, such as the toolbox window and server explorer window in the
VisualBasic.Net IDE.

Anthony

"Nak" <a@a.com> wrote in message
news:Oz******** ******@tk2msftn gp13.phx.gbl...
Hi Anthony,

This can all be done with timers, first of all you need to make a
function that will place the control exactly how you would like it in both
states (hidden and visible)

...
Private sub showHideStuff(B yval iVisible as boolean)
If(iVisible) then
'Put in visible state
Else
'Put in hidden state
End if
End sub
...

When you have made the function test it via a command button to make
sure that it hides and shows just how you would like it. Then you need to
place code in the "MouseOver" event of the control that you wish to make it visivle on,

showHideStuff(T rue)

Make sure that works also. Then make a timer object and in the ellapse of the timer put the hide code. You want the timer to ellapse about 2
seconds after the mouse has left the "toolbox". Make sure that the timer is stopped every time that the mouse cursor returns on the "toolbox" that you
are hiding.

If you have no luck in doing this let me know and I shall put an example together for you. It's pretty straight forward, I have used similar code to hide transports in fullscreen slideshow presentations. I hope this info
helps.

Nick.

"Anthony Fine" <an*****@sfa200 0.com> wrote in message
news:Oi******** ******@tk2msftn gp13.phx.gbl...
Hello All,

I would like to have a TreeView control on a form that autohides when the mouse leaves the area of the control, much like the Toolbox window in the VB.Net IDE. I have searched MSDN, but came up unsuccessful, any help will be greatly appreciated.

--
Thank you,

Anthony


Nov 19 '05 #2
Nak
Hi Anthony,

You mean as in the "smooth scrolling" effect? If you want to make it
move gradually rather than in 1 step you would be better off doing it in
another thread, that way it shouldn't slow down as other things occur in
your application, that was probably the only multithreaded thing I managed
to do successfully in VB6. Make a constant for the steps you wish it to
take, i.e. 1 for the smoothest effect and move it gradually,

... something like...
while toolbox.left < finalposition
toolbox.left -= 1
end while
...

It could probably be done nice than that, but don't foll yourself that
the MS implementation in the VS IDE is any better, it all works in the same
principal.

Nick.

"Anthony Fine" <an*****@sfa200 0.com> wrote in message
news:ex******** ******@tk2msftn gp13.phx.gbl...
Thanks for the response. I implemented something like this earlier, and it worked, just didn't have the clean appearance like other controls when they autohide, such as the toolbox window and server explorer window in the
VisualBasic.Net IDE.

Anthony

"Nak" <a@a.com> wrote in message
news:Oz******** ******@tk2msftn gp13.phx.gbl...
Hi Anthony,

This can all be done with timers, first of all you need to make a
function that will place the control exactly how you would like it in both
states (hidden and visible)

...
Private sub showHideStuff(B yval iVisible as boolean)
If(iVisible) then
'Put in visible state
Else
'Put in hidden state
End if
End sub
...

When you have made the function test it via a command button to make
sure that it hides and shows just how you would like it. Then you need to place code in the "MouseOver" event of the control that you wish to make it
visivle on,

showHideStuff(T rue)

Make sure that works also. Then make a timer object and in the

ellapse
of the timer put the hide code. You want the timer to ellapse about 2
seconds after the mouse has left the "toolbox". Make sure that the timer is
stopped every time that the mouse cursor returns on the "toolbox" that
you are hiding.

If you have no luck in doing this let me know and I shall put an

example
together for you. It's pretty straight forward, I have used similar

code to
hide transports in fullscreen slideshow presentations. I hope this info
helps.

Nick.

"Anthony Fine" <an*****@sfa200 0.com> wrote in message
news:Oi******** ******@tk2msftn gp13.phx.gbl...
Hello All,

I would like to have a TreeView control on a form that autohides when

the mouse leaves the area of the control, much like the Toolbox window in the VB.Net IDE. I have searched MSDN, but came up unsuccessful, any help will be greatly appreciated.

--
Thank you,

Anthony



Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
19877
by: SoKool | last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control. I intend to use a treeview to generate a dynamic menu by collating data from a Sql Server Table. Many thanks.
8
4396
by: Hrvoje Voda | last post by:
What is wrong in this code? private void tree_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.Enter ) {
3
2819
by: Peter | last post by:
Hello, We are inserting a side menu to our application using a class that is writing HTML on all our pages. This is a part of the code as an example: writer.Write(" <table WIDTH=""100%"" BORDER=""0"" CELLSPACING=""0"" CELLPADDING=""0"" ID=""Table1""> " & vbNewLine) writer.Write(" <tr>" & vbNewLine) writer.Write(" ...
4
14166
by: Ben Coats | last post by:
Hey, I'm trying to find code for an Explorer-style Directory ComboBox. (You know, it display "Desktop", "My Computer", all drives, etc., but it has a treeview control inside the combobox so that you can navigate through the file system as well.) I've found some on the web, but all of them just have the drives and desktop directories and are...
10
2338
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a top border. Is it possible to have more than 1 style at the same level (parent node) when using a SiteMap? I want it to appear something like...
1
2542
by: musosdev | last post by:
Hi guys I was using the Microsoft.Web.UI.WebControls extra namespace in my application to provide me with a TreeView control. I was using specifically ..GetNodeFromIndex(), SelectedNodeIndex and NodeData. All 3 of which are now giving errors is the new Asp.net TreeView. I'm found the Value property which replaces NodeData, but what about...
2
1567
by: rolf.oltmans | last post by:
Hello all, I need to place treeview control in Grid control. I need to place it in a grid because I need to show calendar against every node. Is placing a treeview in grid possible? If I need to create my own control that would include capabilities of both treeview and Grid what would I have to do? Being new to asp.net I guess I've to make...
1
4910
by: doemon | last post by:
Hi, I'm working on a pagination control and I need to dynamically rerender a treeview to display the next set of nodes depending on which page we're on. For example, page 1 will dispaly only nodes 1 to 10, but when the user clicks , the tree will display nodes 11 to 20. Page 1 will is loaded when the page that contains the ascx (parent...
0
1980
by: noneya22 | last post by:
I want to use a TreeView control as a one-level, vertical navigation menu. I'm using this control currently with a SiteMapDataSource and .sitemap file. I've written code that associates an image with each TreeView node based upon a custom attribute I have included in the siteMapNode nodes of my .sitemap file. This all works as desired,...
0
12776
by: jiing | last post by:
Hi all, I want to use sting(the same as Node.Text) to judge if a node exists in TreeView. I've tried several ways, but seems all failed. could anybody help me? Thanks in advance. //My TreeView is defined to has depth =3 only.
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.