473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

More treeview woes.

Hi all.

Is it possible to store some additional information in each node of a
treeview but without displaying it?

i.e. If, for example, my treeview displayed a list of products. But
additionally stored in it is the price of the product. If i clicked on a
node, a messagebox would display the product name and the price. But the
price is only visible upon request.

Thanks

--

I'll have a B please Bob.
Nov 21 '05 #1
14 931
"Bob Hollness" <bo*@blockbuster.com> schrieb:
Is it possible to store some additional information in each node of a
treeview but without displaying it?


'TreeNode' has a 'Tag' property that can be used to store additional data
for a node.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2
Herfried K. Wagner [MVP] wrote:
"Bob Hollness" <bo*@blockbuster.com> schrieb:
Is it possible to store some additional information in each node of a
treeview but without displaying it?


'TreeNode' has a 'Tag' property that can be used to store additional data
for a node.

Perfect. Thanks.

p.s. Out of curiousity, how long did it take you to get the MVP?
--

I'll have a B please Bob.
Nov 21 '05 #3
Bob,

"Bob Hollness" <bo*@blockbuster.com> schrieb:
p.s. Out of curiousity, how long did it take you to get the MVP?


Do you really expect an answer? IIRC, about a half year. Nevertheless,
there is no guarantee that someone who contributes for "exactly a half year"
will be awarded too -- being awarded depends on some other factors too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

"Bob Hollness" <bo*@blockbuster.com> schreef in bericht
news:e6**************@TK2MSFTNGP15.phx.gbl...
Hi all.

Is it possible to store some additional information in each node of a
treeview but without displaying it?

i.e. If, for example, my treeview displayed a list of products. But
additionally stored in it is the price of the product. If i clicked on a
node, a messagebox would display the product name and the price. But the
price is only visible upon request.

Thanks

--

I'll have a B please Bob.


It's indeed possible with the "Tag" Property (like Herfried K. Wagner said)

But I have another question about TreeViews.
Is it possible to switch 2 TreeNodes with each other?

I tried several ways but none of them ended in a way I wanted :-/
The most logical way (in my opinion) is to do it like this:

Dim tempNode as new TreeNode
Dim index as Integer

index = Me.tvSorted.SelectedNode.Index

tempNode = Me.tvSorted.SelectedNode
Me.tvSorted.Nodes(index) = Me.tvSorted.Nodes(index + 1)
Me.tvSorted.Nodes(index + 1) = tempNode

The result of this code is that the 2 TreeNodes switch place like I want it,
but I also get 2 extra TreeNodes, one of each and in the old order.
Example:
A
B
C

Switch A and B with the code above

B
A
A
B
C

This is the result of the code...
The reason of this... I really don't know...

Is it possible what I want to do or do I have to another control to work
with

Thanks in advance

Yves
Nov 21 '05 #5
Of course he expects an answer you idiot. Otherwise he would not have
asked. Stop being such a pompous fuck, even with an MVP you are still
a dimwit. I saw your photo on the MVP website and almost fell off of
my chair laughing.

Spend less time in front of your computer and go out and get a
girlfriend.

Nov 21 '05 #6
You idiot. Of course he expects an answer, otherwise he would not have
asked. Stop being so pompous and take your head from your rear end.
I just saw your photo from the MVP website and almost died laughing.
You should spend less time with computers and go out more to try and
get a girlfriend instead of being an idiot on this group.

Nov 21 '05 #7
Hi,

Although I am, absolute not interested what you find of any individual
including me in this newsgroup.

Will you at least not be a chicken and do it anonymous.

You are obviously not somebody passing by.

Cor
Nov 21 '05 #8
<go************@hotmail.com> schrieb:
[...]


Rules of Conduct
<URL:http://www.microsoft.com/communities/conduct/default.mspx#ECAA>

Show that you are able to learn from your mistakes.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #9
go************@hotmail.com wrote:
You idiot. Of course he expects an answer, otherwise he would not have
asked. Stop being so pompous and take your head from your rear end.
I just saw your photo from the MVP website and almost died laughing.
You should spend less time with computers and go out more to try and
get a girlfriend instead of being an idiot on this group.


8-|

--

I'll have a B please Bob.
Nov 21 '05 #10
And you too. The rules say not to make personal attacks. That must
also include pompousness and sarcasm which are both forms of attacks.
You asking if Bob really wants an answer to his question is the same.
So YOU learn and be a little less of an idiot.

oh and telling you to get a girlfriend was not an attack but a
suggestion. It was advice and assistance, which after all, is that not
what this group is about.

I could not care if you have your MVP and I am sure that Bob does not
either. But it makes you NO better. Remember that as it is VERY
important.

Nov 21 '05 #11
And you too. The rules say not to make personal attacks. That must
also include pompousness and sarcasm which are both forms of attacks.
You asking if Bob really wants an answer to his question is the same.
So YOU learn and be a little less of an idiot.

oh and telling you to get a girlfriend was not an attack but a
suggestion. It was advice and assistance, which after all, is that not
what this group is about.

I could not care if you have your MVP and I am sure that Bob does not
either. But it makes you NO better. Remember that as it is VERY
important.

Nov 21 '05 #12
Cor, I am not doing it anonymous. My name given to me by my mother is
google_groups3. That is why I have the email address that I do.
You may think that my name is silly, but no sillier than yours.

Nov 21 '05 #13
I am from a country where there is by law no difference between sexes.

If a man has a friend or a girlfriend does not matter, however the way you
describe it now can mean that the law says in my country that you are
discriminating.

Therefore, give your opinion not anonymous. Be not a chicken show who you
are.

With that, nothing said about sexual behavior from Herfried, because I don't
know that and let everybody in the world free for his own opinion about that
law in my country.

Cor
Nov 21 '05 #14
<go************@hotmail.com> schrieb:
My name given to me by my mother is
google_groups3.


Let's continue the discussion when you have left puberty...

EOT

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #15

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

Similar topics

2
by: pmcguire67 | last post by:
There has been a lot of discussion lately about extending the treeview control to allow finding a node by key rather than by index. Everyone seems to agree that a hashtable is needed to accomplish...
6
by: L.M | last post by:
Hello, I knew how to use the treeview under VB6. After migrating to .NET, well, I'm lost. I try to add a new node, either to the same level or as a child to a selected node in the treeview....
14
by: Mr.D | last post by:
How do I save/load the contents of a Treeview to a file? I have found several good examples written i VB6, but not a single one for VB.NET. Please help. ---- Tim
10
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...
1
by: kvicky | last post by:
I am trying to load child nodes to a TreeNode in a TreeView in a ASP.net web application. The Treeview with parent nodes are loaded on a Page_load while doing if( ! ISPostback ) and then in the...
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
9
by: Mark Rae | last post by:
Hi, This time, I'm looking for a regular expression which says "the string must contain exactly seven or exactly eight digits" e.g. 123456 fails 1234567 passes 12345678 passes 123456789...
5
by: Josh | last post by:
Hi, I'm trying to use the standard TreeView in VS2005 ( under the navigation menu ). But I cant get any events to postback and none of the style settings are being applied. None of the...
0
by: metricspaces | last post by:
Hi, I'm using VB6 and the TreeView from "Microsoft Windows Common Controls.". Due to the bug http://support.microsoft.com/kb/182231 it is not possible to add more than 32767 nodes to the tree. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.