Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Need help --> Treeviews : checkbox : selecting programmatically : StatePictureIndex

2 posts in Objects Last posting was on 2005-02-06 07:06:27.0Z
Chris Kersey Posted on 2005-02-06 06:45:44.0Z
Reply-To: "Chris Kersey" <junkmail@ckdesigns.com>
From: "Chris Kersey" <junkmail@ckdesigns.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Need help --> Treeviews : checkbox : selecting programmatically : StatePictureIndex
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 64.81.241.207
X-Original-NNTP-Posting-Host: 64.81.241.207
Message-ID: <4205bd18$1@forums-1-dub>
Date: 5 Feb 2005 22:45:44 -0800
X-Trace: forums-1-dub 1107672344 64.81.241.207 (5 Feb 2005 22:45:44 -0800)
X-Original-Trace: 5 Feb 2005 22:45:44 -0800, 64.81.241.207
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8209
Article PK: 735477

Hello,

I'm using PB 8.02 and I populating a treeview whose "checkboxes" property is
set to true. I have a button with an onclick event that traverses the tree
setting each nodes' StatePictureIndex to "2", but the state of the unchecked
checkboxes are not changing. I'm wondering what else I need to do to get
this to work. The help files aren't any help when it comes to using
checkboxes on a treeview, and I've not found anything online yet.

Thanks for any information you might be willing to share.

--
Chris


Chris Kersey Posted on 2005-02-06 07:06:27.0Z
Reply-To: "Chris Kersey" <junkmail@ckdesigns.com>
From: "Chris Kersey" <junkmail@ckdesigns.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4205bd18$1@forums-1-dub>
Subject: I Figured it Out...
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Original-NNTP-Posting-Host: 64.81.241.207
Message-ID: <4205c1ee$1@forums-2-dub>
X-Original-Trace: 5 Feb 2005 23:06:22 -0800, 64.81.241.207
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 5 Feb 2005 23:06:25 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 5 Feb 2005 23:06:27 -0800
X-Trace: forums-1-dub 1107673587 10.22.108.75 (5 Feb 2005 23:06:27 -0800)
X-Original-Trace: 5 Feb 2005 23:06:27 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8210
Article PK: 735478

After Calling
tv.GetItem(hItem,tv_item)
I set the StatePictureIndex
tv_item.StatePictureIndex = 2
Then I "set the item..."
tv.SetItem(hItem,tv_item)

and the checkbox "checked".

Sybase needs to put this example in their help files as it doesn't explain
that the "checkboxes" option on the control doesn't mean that the Treeview
items have checkbox controls or "checked" properties one would expect.
Instead, setting the Treeview.CheckBoxes = true overrides the StatePictures
(1 = off, 2 = on) to some predefined images in the system, and even when
set, they don't actually check the item until you explicitly "set" the item
using the Treeview.SetItem(hItem,treeviewItem) function.

What's interesting too is that the SetItem requuires not only the
treeviewitem, but the handle to the treeviewitem too... which is curious
since the treeview item has an ItemHandle.

very frustrating ... I had to piecemeal this information together from at
least 4 different resources.

sorry for venting.
Hope this helps someone else.
Chris

"Chris Kersey" <junkmail@ckdesigns.com> wrote in message
news:4205bd18$1@forums-1-dub...
> Hello,
>
> I'm using PB 8.02 and I populating a treeview whose "checkboxes" property
is
> set to true. I have a button with an onclick event that traverses the tree
> setting each nodes' StatePictureIndex to "2", but the state of the
unchecked
> checkboxes are not changing. I'm wondering what else I need to do to get
> this to work. The help files aren't any help when it comes to using
> checkboxes on a treeview, and I've not found anything online yet.
>
> Thanks for any information you might be willing to share.
>
> --
> Chris
>
>