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.

treeview and checkboxes

4 posts in General Discussion (Chinese) Last posting was on 2008-07-11 06:54:49.0Z
Martin Mueller Posted on 2008-07-09 05:47:46.0Z
Sender: 7f9b.48744e56.1804289383@sybase.com
From: Martin Mueller
Newsgroups: sybase.public.chinese.powerbuilder.general
Subject: treeview and checkboxes
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48745102.7feb.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 8 Jul 2008 22:47:46 -0700
X-Trace: forums-1-dub 1215582466 10.22.241.41 (8 Jul 2008 22:47:46 -0700)
X-Original-Trace: 8 Jul 2008 22:47:46 -0700, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:386
Article PK: 104406

Hi all,

I'd like to use the checkboxes in my treeview datawindow
(tv_1.checkboxes = TRUE). Now my customer should select
items he uses for a report. When closing the window with the
treeview, I need the data of all checked items.

idea 1: in the close event I check all items if they are
checked - problem: is there an array I can step through all
items?
idea 2: I check the clicked event with
ltvi_item.statePictureIndex = 2 - problem: when I check the
checkbox the statePictureIndex gives me an 1

can anyone give me a hint to cut the knot in my head :)

thanks in advance
Martin


Martin Mueller Posted on 2008-07-09 05:49:09.0Z
Sender: 7f9b.48744e56.1804289383@sybase.com
From: Martin Mueller
Newsgroups: sybase.public.chinese.powerbuilder.general
Subject: Re: treeview and checkboxes
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48745155.7ff4.1681692777@sybase.com>
References: <48745102.7feb.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 8 Jul 2008 22:49:09 -0700
X-Trace: forums-1-dub 1215582549 10.22.241.41 (8 Jul 2008 22:49:09 -0700)
X-Original-Trace: 8 Jul 2008 22:49:09 -0700, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:387
Article PK: 104407

I forgot:
Powerbuilder Version 11.2 build 8407 on Win XP

> Hi all,
>
> I'd like to use the checkboxes in my treeview datawindow
> (tv_1.checkboxes = TRUE). Now my customer should select
> items he uses for a report. When closing the window with
> the treeview, I need the data of all checked items.
>
> idea 1: in the close event I check all items if they are
> checked - problem: is there an array I can step through
> all items?
> idea 2: I check the clicked event with
> ltvi_item.statePictureIndex = 2 - problem: when I check
> the checkbox the statePictureIndex gives me an 1
>
> can anyone give me a hint to cut the knot in my head :)
>
> thanks in advance
> Martin


lucy Posted on 2008-07-11 06:49:09.0Z
From: "lucy" <lucy.liu@sybase.com>
Newsgroups: sybase.public.chinese.powerbuilder.general
References: <48745102.7feb.1681692777@sybase.com> <48745155.7ff4.1681692777@sybase.com>
Subject: Re: treeview and checkboxes
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48770265@forums-1-dub>
Date: 10 Jul 2008 23:49:09 -0700
X-Trace: forums-1-dub 1215758949 10.22.241.152 (10 Jul 2008 23:49:09 -0700)
X-Original-Trace: 10 Jul 2008 23:49:09 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:388
Article PK: 104414

Hi Martin,
Do you mean you are using TreeView Control in DataWindow?
The TreeView DataWindow is not a TreeView Control.It has not the properties
as TreeView Control(Like statePictureIndex)

<Martin Mueller> wrote in message
news:48745155.7ff4.1681692777@sybase.com...
>I forgot:
> Powerbuilder Version 11.2 build 8407 on Win XP
>
>> Hi all,
>>
>> I'd like to use the checkboxes in my treeview datawindow
>> (tv_1.checkboxes = TRUE). Now my customer should select
>> items he uses for a report. When closing the window with
>> the treeview, I need the data of all checked items.
>>
>> idea 1: in the close event I check all items if they are
>> checked - problem: is there an array I can step through
>> all items?
>> idea 2: I check the clicked event with
>> ltvi_item.statePictureIndex = 2 - problem: when I check
>> the checkbox the statePictureIndex gives me an 1
>>
>> can anyone give me a hint to cut the knot in my head :)
>>
>> thanks in advance
>> Martin


hni Posted on 2008-07-11 06:54:49.0Z
From: "hni" <hni@sybase.com>
Newsgroups: sybase.public.chinese.powerbuilder.general
References: <48745102.7feb.1681692777@sybase.com>
Subject: Re: treeview and checkboxes
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <487703b9$1@forums-1-dub>
Date: 10 Jul 2008 23:54:49 -0700
X-Trace: forums-1-dub 1215759289 10.22.241.152 (10 Jul 2008 23:54:49 -0700)
X-Original-Trace: 10 Jul 2008 23:54:49 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:389
Article PK: 104408

Hi,Martin

you could try this in your close event


declare a instance variable
treeviewitem itvi[]


public function integer of_findcheckeditem (long handle);

long childitem
treeviewitem tvitem
getitem(handle, tvitem)
if tvitem.statepictureindex=2 then
itvi[upperbound(itvi) + 1] = tvitem
end if

childitem=finditem(ChildTreeItem!, handle)
do while(childitem<>-1)
of_findcheckeditem(childitem) //recursion
childitem=this.finditem(NextTreeItem!, childitem)
loop

return 1

end function

<Martin Mueller> wrote in message
news:48745102.7feb.1681692777@sybase.com...
> Hi all,
>
> I'd like to use the checkboxes in my treeview datawindow
> (tv_1.checkboxes = TRUE). Now my customer should select
> items he uses for a report. When closing the window with the
> treeview, I need the data of all checked items.
>
> idea 1: in the close event I check all items if they are
> checked - problem: is there an array I can step through all
> items?
> idea 2: I check the clicked event with
> ltvi_item.statePictureIndex = 2 - problem: when I check the
> checkbox the statePictureIndex gives me an 1
>
> can anyone give me a hint to cut the knot in my head :)
>
> thanks in advance
> Martin