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.

Problem with treeview

3 posts in Objects Last posting was on 2004-04-07 18:20:30.0Z
kishore Posted on 2004-01-21 06:33:34.0Z
From: "kishore" <kishore@cgvakindia.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Problem with treeview
Lines: 23
Organization: CG-VAK Sofwtare & Export ltd
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2462.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000
NNTP-Posting-Host: 61.95.184.69
X-Original-NNTP-Posting-Host: 61.95.184.69
Message-ID: <400e1d3e@forums-1-dub>
Date: 20 Jan 2004 22:33:34 -0800
X-Trace: forums-1-dub 1074666814 61.95.184.69 (20 Jan 2004 22:33:34 -0800)
X-Original-Trace: 20 Jan 2004 22:33:34 -0800, 61.95.184.69
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7749
Article PK: 735024

Hi all,


I have two tapages say tabpage1 and tabpage2, in the tabpage1 i have button
named "populate", if i click
that will populate a treeview with say 10 items which resides in the
tabpage2,after i have done this i come to
first tabpage1 and i again click the "populate " button it is populating the
treeview in tabpage2 with less no.of items.
Before the second click i make sure that there no items in te treeview using
deleteitem function.
i use insertitem last for populating the treeview.
The porblem lies in insertitem last,please help regarding the same.

Is it possible to create a treeview at runtime and destroy the same?
please provide some sample code to accomplish the same.

kishore

Thanks,Thanks, Kishore Kumar J CG-VAK Software & Exports Ltd. (
91-422-2434491/92 http://www.cgvakindia.com


BMartins Posted on 2004-03-30 15:19:06.0Z
From: "BMartins" <beatriz@pred.com.br>
Newsgroups: sybase.public.powerbuilder.objects
References: <400e1d3e@forums-1-dub>
Subject: Re: Problem with treeview
Lines: 108
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 200.222.217.2
X-Original-NNTP-Posting-Host: 200.222.217.2
Message-ID: <40698fea$1@forums-1-dub>
Date: 30 Mar 2004 07:19:06 -0800
X-Trace: forums-1-dub 1080659946 200.222.217.2 (30 Mar 2004 07:19:06 -0800)
X-Original-Trace: 30 Mar 2004 07:19:06 -0800, 200.222.217.2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7851
Article PK: 735124

Test this.

BMartins


// Remember ue_ExpandeSubItens is recursive
// and data are from dws in iso_dstreg.idst
////////////////////////////////////////////////////////////////////////////
//
// Event: ue_updatetree
////////////////////////////////////////////////////////////////////////////
//
integer li_ret
integer li_TotalLin
integer li_pos
integer li_level
long ll_Handle
string ls_Cod
string ls_CodItem
treeviewitem ltvi_Itemnow



SetPointer (HourGlass!)

// Retrieve data
li_ret = this.event trigger ue_retrieve()
if li_ret < 0 then
messagebox('Error','Data not found.')
return -1
end if

// Test handle passed by parametrer (handle of tree item to start refresh)
if isnull(al_handle) then // then root
// clean
do until itv_tree.FindItem(RootTreeItem!, 0) = -1
itv_tree.DeleteItem(0)
loop

// Redo tree
li_TotalLin = iso_dstreg.idst[1].rowcount()
IF li_TotalLin < 0 THEN Return -1

// Expande itens
li_ret = this.event trigger ue_ExpandeItem()

// first value
ll_Handle = itv_tree.FindItem(RootTreeItem!,0)
itv_tree.SelectItem(ll_handle)
itv_tree.getItem(ll_Handle,ltvi_Itemnow)
ls_Cod = String(ltvi_Itemnow.Data)

li_ret = this.event trigger ue_ExpandeSubItens(ls_Cod,ll_Handle)

else
// superior item
li_ret = itv_tree.getItem(al_Handle,ltvi_Itemnpw)
ls_Cod = String(ltvi_Itemnow.Data)

// level of tree
li_ret = this.of_Obtemlevel(ls_Cod,li_levelAtual)

// clean
ll_Handle = itv_tree.FindItem(ChildTreeItem! ,al_handle)
Do while ll_Handle <> -1
itv_tree.DeleteItem(ll_Handle)
ll_Handle = itv_tree.FindItem(ChildTreeItem! ,al_handle)
loop

// redo tree
li_ret = this.event trigger ue_ExpandeSubItens(ls_Cod,al_Handle)

end if

itv_tree.setFocus()
SetPointer (Arrow!)
return 1

"kishore" <kishore@cgvakindia.com> escreveu na mensagem
news:400e1d3e@forums-1-dub...

> Hi all,
>
>
> I have two tapages say tabpage1 and tabpage2, in the tabpage1 i have
button
> named "populate", if i click
> that will populate a treeview with say 10 items which resides in the
> tabpage2,after i have done this i come to
> first tabpage1 and i again click the "populate " button it is populating
the
> treeview in tabpage2 with less no.of items.
> Before the second click i make sure that there no items in te treeview
using
> deleteitem function.
> i use insertitem last for populating the treeview.
> The porblem lies in insertitem last,please help regarding the same.
>
> Is it possible to create a treeview at runtime and destroy the same?
> please provide some sample code to accomplish the same.
>
> kishore
>
> Thanks,Thanks, Kishore Kumar J CG-VAK Software & Exports Ltd. (
> 91-422-2434491/92 http://www.cgvakindia.com
>
>


Ken D. Posted on 2004-04-07 18:20:30.0Z
From: "Ken D." <NOSPAM_Kend998@yahoo.com>
Newsgroups: sybase.public.powerbuilder.objects
Organization: 198.160.148.250
References: <400e1d3e@forums-1-dub> <40698fea$1@forums-1-dub>
X-Newsreader: AspNNTP 1.50 (Takeshi Eto)
Subject: Re: Problem with treeview
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 64.79.161.46
X-Original-NNTP-Posting-Host: 64.79.161.46
Message-ID: <4074385e$1@forums-1-dub>
Date: 7 Apr 2004 10:20:30 -0800
X-Trace: forums-1-dub 1081358430 64.79.161.46 (7 Apr 2004 10:20:30 -0800)
X-Original-Trace: 7 Apr 2004 10:20:30 -0800, 64.79.161.46
Lines: 116
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7867
Article PK: 735140

What items are missing? This does not sound like a problem with the insertitemX
method it sounds like you are scrolling through the items incorrectly.


Ken D.
On 30 Mar 2004 07:19:06 -0800,
in sybase.public.powerbuilder.objects

BMartins <beatriz@pred.com.br> wrote:
>Test this.
>
>BMartins
>
>
>// Remember ue_ExpandeSubItens is recursive
>// and data are from dws in iso_dstreg.idst
>////////////////////////////////////////////////////////////////////////////
>//
>// Event: ue_updatetree
>////////////////////////////////////////////////////////////////////////////
>//
>integer li_ret
>integer li_TotalLin
>integer li_pos
>integer li_level
>long ll_Handle
>string ls_Cod
>string ls_CodItem
>treeviewitem ltvi_Itemnow
>
>
>
>SetPointer (HourGlass!)
>
>// Retrieve data
>li_ret = this.event trigger ue_retrieve()
>if li_ret < 0 then
> messagebox('Error','Data not found.')
> return -1
>end if
>
>// Test handle passed by parametrer (handle of tree item to start refresh)
>if isnull(al_handle) then // then root
> // clean
> do until itv_tree.FindItem(RootTreeItem!, 0) = -1
> itv_tree.DeleteItem(0)
> loop
>
> // Redo tree
> li_TotalLin = iso_dstreg.idst[1].rowcount()
> IF li_TotalLin < 0 THEN Return -1
>
> // Expande itens
> li_ret = this.event trigger ue_ExpandeItem()
>
> // first value
> ll_Handle = itv_tree.FindItem(RootTreeItem!,0)
> itv_tree.SelectItem(ll_handle)
> itv_tree.getItem(ll_Handle,ltvi_Itemnow)
> ls_Cod = String(ltvi_Itemnow.Data)
>
> li_ret = this.event trigger ue_ExpandeSubItens(ls_Cod,ll_Handle)
>
>else
> // superior item
> li_ret = itv_tree.getItem(al_Handle,ltvi_Itemnpw)
> ls_Cod = String(ltvi_Itemnow.Data)
>
> // level of tree
> li_ret = this.of_Obtemlevel(ls_Cod,li_levelAtual)
>
> // clean
> ll_Handle = itv_tree.FindItem(ChildTreeItem! ,al_handle)
> Do while ll_Handle <> -1
> itv_tree.DeleteItem(ll_Handle)
> ll_Handle = itv_tree.FindItem(ChildTreeItem! ,al_handle)
> loop
>
> // redo tree
> li_ret = this.event trigger ue_ExpandeSubItens(ls_Cod,al_Handle)
>
>end if
>
>itv_tree.setFocus()
>SetPointer (Arrow!)
>return 1
>
>"kishore" <kishore@cgvakindia.com> escreveu na mensagem
>news:400e1d3e@forums-1-dub...
>> Hi all,
>>
>>
>> I have two tapages say tabpage1 and tabpage2, in the tabpage1 i have
>button
>> named "populate", if i click
>> that will populate a treeview with say 10 items which resides in the
>> tabpage2,after i have done this i come to
>> first tabpage1 and i again click the "populate " button it is populating
>the
>> treeview in tabpage2 with less no.of items.
>> Before the second click i make sure that there no items in te treeview
>using
>> deleteitem function.
>> i use insertitem last for populating the treeview.
>> The porblem lies in insertitem last,please help regarding the same.
>>
>> Is it possible to create a treeview at runtime and destroy the same?
>> please provide some sample code to accomplish the same.
>>
>> kishore
>>
>> Thanks,Thanks, Kishore Kumar J CG-VAK Software & Exports Ltd. (
>> 91-422-2434491/92 http://www.cgvakindia.com
>>
>>
>
>