Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Misc > Re: Redraw Tree...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 10 Topic 5983 of 6154
Post > Topic >>

Re: Redraw TreeView

by "Maarten Wiltink" <maarten@[EMAIL PROTECTED] > Feb 15, 2008 at 09:51 AM

"Fons" <fonzzzNO@[EMAIL PROTECTED]
> wrote in message
news:47b4b297$0$85781$e4fe514c@[EMAIL PROTECTED]
> If I want a TreeNode give a new image:
>
>    if TreeView.Selected.ImageIndex = itemRedButton then
>      TreeView.Selected.ImageIndex := itemGreenButton
>    else
>      TreeView.Selected.ImageIndex := itemRedButton;
>    TreeView.Selected.SelectedIndex := TreeView.Selected.ImageIndex;
>
> I have to flip the StateIndex to force the TreeView to redraw:
>
>    TreeView.Selected.StateIndex := -1;
>    TreeView.Selected.StateIndex := itemCheckBoxFalse;
>
> What am I doing wrong ?

Doing something that only has the side-effect of redrawing.
It's probably a bug that the treeview doesn't redraw itself
when obviously its appearance may have changed, but I wouldn't
do something as unrelated as changing a node's StateIndex...
when you could be calling Invalidate.

Groetjes,
Maarten Wiltink
 




 10 Posts in Topic:
Redraw TreeView
Fons <fonzzzNO@[EMAIL   2008-02-14 22:28:56 
Re: Redraw TreeView
"alanglloyd@[EMAIL P  2008-02-14 14:09:45 
Re: Redraw TreeView
Fons <fonzzzNO@[EMAIL   2008-02-15 12:38:40 
Re: Redraw TreeView
Jamie <jamie_ka1lpa_no  2008-02-15 19:35:35 
Re: Redraw TreeView
Fons <fonzzzNO@[EMAIL   2008-02-16 02:20:19 
Re: Redraw TreeView
Hans-Peter Diettrich <  2008-02-16 04:24:16 
Re: Redraw TreeView
Fons <fonzzzNO@[EMAIL   2008-02-17 00:10:14 
Re: Redraw TreeView
Fons <fonzzzNO@[EMAIL   2008-02-17 15:52:43 
Re: Redraw TreeView
"Maarten Wiltink&quo  2008-02-15 09:51:08 
Re: Redraw TreeView
Fons <fonzzzNO@[EMAIL   2008-02-15 19:05:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 20:03:18 CDT 2008.