BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I use the stateimages in a treeview component?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Juan Ignacio Videla
Guest





PostPosted: Tue Jan 20, 2004 1:01 pm    Post subject: How can I use the stateimages in a treeview component? Reply with quote



I want to know how to display the stateimages in runtime? any idea...

Back to top
Pete Fraser
Guest





PostPosted: Tue Jan 20, 2004 4:12 pm    Post subject: Re: How can I use the stateimages in a treeview component? Reply with quote



You need to set up an ImageList component with the images you want.
Then set the StateImages of the TreeView to the ImageList.
Then for each Node you create, set the StateIndex to reference the Image you
want to show. If it's -1 then no image is shown.

HTH Pete

"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote

Quote:
I want to know how to display the stateimages in runtime? any idea...



Back to top
Juan Ignacio Videla
Guest





PostPosted: Wed Jan 21, 2004 6:34 am    Post subject: Re: How can I use the stateimages in a treeview component? Reply with quote



I did it but no image appears at all... what action do I have to do to
over the treeview so that this image appears. thks


Pete Fraser wrote:
Quote:
You need to set up an ImageList component with the images you want.
Then set the StateImages of the TreeView to the ImageList.
Then for each Node you create, set the StateIndex to reference the Image you
want to show. If it's -1 then no image is shown.

HTH Pete

"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote in message
news:400d269a$1 (AT) newsgroups (DOT) borland.com...

I want to know how to display the stateimages in runtime? any idea...





Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Jan 21, 2004 6:52 am    Post subject: Re: How can I use the stateimages in a treeview component? Reply with quote


"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote

Quote:
I did it but no image appears at all... what action do I
have to do to over the treeview so that this image appears.

Peter already told you everything you need to do. If no images are
appearing, then you did not do everything. Please explain, in detail, step
by step, everything that you have actually done.


Gambit



Back to top
Juan Ignacio Videla
Guest





PostPosted: Wed Jan 21, 2004 6:58 am    Post subject: Re: How can I use the stateimages in a treeview component? Reply with quote

First i setup the imagelist component, then i change the stateimage
property of the treeview with this imagelist. Then in the item editor I
set the stateindex to 0. And then when I run the application, the icon
does not appear.... may be I am not doing the apropiate action to
display... when this icon is supposed to appear?


Quote:
"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote in message
news:400e1d84$1 (AT) newsgroups (DOT) borland.com...

I did it but no image appears at all... what action do I
have to do to over the treeview so that this image appears.


Peter already told you everything you need to do. If no images are
appearing, then you did not do everything. Please explain, in detail, step
by step, everything that you have actually done.


Gambit




Back to top
Juan Ignacio Videla
Guest





PostPosted: Wed Jan 21, 2004 7:42 am    Post subject: Re: How can I use the stateimages in a treeview component? Reply with quote

It started working when I use the stateindex=1. When I use 0 value it
does not work... thanks anyway.

Juan Ignacio Videla wrote:

Quote:
First i setup the imagelist component, then i change the stateimage
property of the treeview with this imagelist. Then in the item editor I
set the stateindex to 0. And then when I run the application, the icon
does not appear.... may be I am not doing the apropiate action to
display... when this icon is supposed to appear?


"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote in message
news:400e1d84$1 (AT) newsgroups (DOT) borland.com...

I did it but no image appears at all... what action do I
have to do to over the treeview so that this image appears.



Peter already told you everything you need to do. If no images are
appearing, then you did not do everything. Please explain, in detail,
step
by step, everything that you have actually done.


Gambit





Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Jan 21, 2004 7:20 pm    Post subject: Re: How can I use the stateimages in a treeview component? Reply with quote


"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote

Quote:
It started working when I use the stateindex=1. When
I use 0 value it does not work... thanks anyway.

State indexes do not work the same way as normal indexes. Index 0 has
special meaning and cannot be used for a state image.


Gambit



Back to top
Juan Ignacio Videla
Guest





PostPosted: Thu Jan 22, 2004 10:51 am    Post subject: Re: How can I use the stateimages in a treeview component? Reply with quote

When I use the stateindex equal to zero, i get no gap where the icon
should appear... it seems useful, if I want to leave no gap at some
level... where for example no icon is necessary. Do you know if there is
a similar index value for the imageindex case.


Remy Lebeau (TeamB) wrote:
Quote:
"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote in message
news:400e2d81 (AT) newsgroups (DOT) borland.com...

It started working when I use the stateindex=1. When
I use 0 value it does not work... thanks anyway.


State indexes do not work the same way as normal indexes. Index 0 has
special meaning and cannot be used for a state image.


Gambit




Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Jan 22, 2004 8:03 pm    Post subject: Re: How can I use the stateimages in a treeview component? Reply with quote


"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote


Quote:
When I use the stateindex equal to zero, i get no gap where
the icon should appear...

That is correct. Index 0 tells the TreeView not to display any icon at all.

Quote:
Do you know if there is a similar index value for the imageindex case.

For the ImageIndex property, set it to -1 to not display an icon.


Gambit



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.