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 StatePictureIndex (PB7)

6 posts in Objects Last posting was on 2003-04-02 13:54:22.0Z
Renan HENRY Posted on 2003-04-01 08:48:41.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Renan HENRY" <rhenry@phj.fr>
Organization: PHJ[195.114.69.74]
X-Newsreader: AspNNTP 1.50 (C I Host)
Subject: Problem with TreeView StatePictureIndex (PB7)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Tue, 01 Apr 2003 00:48:41 -0800
NNTP-Posting-Host: 66.221.40.1
Lines: 16
Message-ID: <364_#cpn$tC#CHA.324@forums-1-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7298
Article PK: 734587

Hello all,
I've got a TreeView.
At first time, I display the TreeView without StatePictures (normal mod).
Via the popmenu, the user can pass to admin mod, and I want to display the
TreeView with StatePictures... with my StatePictures. (I've got 3 StatePictures,
uncheck, check, and grey) But It display some 2 icons (check and uncheck) only,
and those icons aren't the good.
I can display my icons only if those are display at the beginning but after
change the checkboxes properties I can't show my icons.

anybody know about it?

Thks.

Renan HENRY
http://www.phj.fr
rhenry@phj.fr


Arnoud Posted on 2003-04-01 22:17:43.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Arnoud" <arnoud_nospam@gloriant.be>
Subject: Re: Problem with TreeView StatePictureIndex (PB7)
Date: Wed, 2 Apr 2003 00:17:43 +0200
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 14.170-201-80.adsl.skynet.be 80.201.170.14
Message-ID: <364_uQaZWzJ#CHA.287@forums-1-dub>
References: <364_#cpn$tC#CHA.324@forums-1-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7300
Article PK: 734593

Hi,

Make sure that the 'checkbox' property of the treeview control is NOT
checked.
When this propery is checked it uses the statepicture to display the system
defined check boxes (2-state)
If you want 3-state checkboxes you'll have to code it yourself ( You'll have
to check the X-pos of the mouse pointer in the clicked event and switch
state pictures accordingly.)


--
HTH

Arnoud
Url: http://www.gloriant.be
Also check out my PB Reference site : http://www.pbinfo.be

"Renan HENRY" <rhenry@phj.fr> wrote in message
news:#cpn$tC#CHA.324@forums-1-dub...
> Hello all,
> I've got a TreeView.
> At first time, I display the TreeView without StatePictures (normal mod).
> Via the popmenu, the user can pass to admin mod, and I want to display the
> TreeView with StatePictures... with my StatePictures. (I've got 3
StatePictures,
> uncheck, check, and grey) But It display some 2 icons (check and uncheck)
only,
> and those icons aren't the good.
> I can display my icons only if those are display at the beginning but
after
> change the checkboxes properties I can't show my icons.
>
> anybody know about it?
>
> Thks.
>
> Renan HENRY
> http://www.phj.fr
> rhenry@phj.fr


Tyler Posted on 2003-04-02 12:38:23.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Tyler" <NoSpamPlease_tcraft@gnb.ca>
Subject: Re: Problem with TreeView StatePictureIndex (PB7)
Date: Wed, 2 Apr 2003 08:38:23 -0400
Lines: 81
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 182.27.gnb.ca 142.139.182.27
Message-ID: <364_uoRqrUR#CHA.333@forums-2-dub>
References: <364_#cpn$tC#CHA.324@forums-1-dub> <364_uQaZWzJ#CHA.287@forums-1-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7301
Article PK: 734589

I agree that the checkbox property has to be checked, but I don't see what
you mean by the X-pos of the mouse. I use three statepictures:
1 = Folder Closed
2 = Folder Open
3 = Arrow Indicating current Item
If handle > 0 then
I handle it in the clicked event as follows
IF il_LastHandle > 0 THEN
This.GetItem(il_LastHandle,ltvi)
if ltvi.Expanded = true then
ltvi.statepictureindex = 2
else
ltvi.statepictureindex = 1
end if
This.SetItem(il_LastHandle,ltvi)
END IF
This.GetItem(Handle,ltvi)
ltvi.statepictureindex = 3
ls_filter = "object_qualified_name = '" + ltvi.data + "'"
dw_2.SetFilter(ls_filter)
dw_2.Filter()
IF dw_2.RowCount() > 0 then
dw_2.setrow(1)
dw_1.retrieve(dw_2.GetItemNumber(1,"object_id"))
else
dw_1.retrieve(0)
end if
il_LastHandle = handle
end if

"Arnoud" <arnoud_nospam@gloriant.be> wrote in message
news:uQaZWzJ#CHA.287@forums-1-dub...
> Hi,
>
> Make sure that the 'checkbox' property of the treeview control is NOT
> checked.
> When this propery is checked it uses the statepicture to display the
system
> defined check boxes (2-state)
> If you want 3-state checkboxes you'll have to code it yourself ( You'll
have
> to check the X-pos of the mouse pointer in the clicked event and switch
> state pictures accordingly.)
>
>
> --
> HTH
>
> Arnoud
> Url: http://www.gloriant.be
> Also check out my PB Reference site : http://www.pbinfo.be
> "Renan HENRY" <rhenry@phj.fr> wrote in message
> news:#cpn$tC#CHA.324@forums-1-dub...
> > Hello all,
> > I've got a TreeView.
> > At first time, I display the TreeView without StatePictures (normal
mod).
> > Via the popmenu, the user can pass to admin mod, and I want to display
the
> > TreeView with StatePictures... with my StatePictures. (I've got 3
> StatePictures,
> > uncheck, check, and grey) But It display some 2 icons (check and
uncheck)
> only,
> > and those icons aren't the good.
> > I can display my icons only if those are display at the beginning but
> after
> > change the checkboxes properties I can't show my icons.
> >
> > anybody know about it?
> >
> > Thks.
> >
> > Renan HENRY
> > http://www.phj.fr
> > rhenry@phj.fr
>
>


Arnoud Oortwijk Posted on 2003-04-02 13:10:55.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Arnoud Oortwijk" <gloriant_NOSPAM@skynet.be>
Subject: Re: Problem with TreeView StatePictureIndex (PB7)
Date: Wed, 2 Apr 2003 15:10:55 +0200
Lines: 111
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: default.eu.s1.com 194.74.111.206
Message-ID: <364_#WY$qnR#CHA.333@forums-2-dub>
References: <364_#cpn$tC#CHA.324@forums-1-dub> <364_uQaZWzJ#CHA.287@forums-1-dub> <364_uoRqrUR#CHA.333@forums-2-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7302
Article PK: 734592

Renan cannot use the checkboxes as implemented in PB treeview because they
only support 2-states. Therefore the checkbox property should not be
checked.
If he still wants to simulate the behaviour that when a user clicks on the
statepicture that the state of the checkbox (bitmap) changes, he'll have to
code it himself.
To avoid changing the 'checkbox state' when the user clicks the label or the
cross to expand/collapse the item he'll have to check the X-pos of the mouse
pointer.

As I understand he if the user clicks the state picture multiple times
without placing the focus on another treeview item the state picture should
change 1,2,3 and back to 1.

I don't see anything in your code that processes the click of the mouse on
the state picture. You only change the statepicture when the treeviewitem
gains or loses focus.

--
HTH

Arnoud
Url: http://www.gloriant.be
PB Reference: http://www.pbinfo.be

"Tyler" <NoSpamPlease_tcraft@gnb.ca> wrote in message
news:uoRqrUR#CHA.333@forums-2-dub...
> I agree that the checkbox property has to be checked, but I don't see what
> you mean by the X-pos of the mouse. I use three statepictures:
> 1 = Folder Closed
> 2 = Folder Open
> 3 = Arrow Indicating current Item
> If handle > 0 then
> I handle it in the clicked event as follows
> IF il_LastHandle > 0 THEN
> This.GetItem(il_LastHandle,ltvi)
> if ltvi.Expanded = true then
> ltvi.statepictureindex = 2
> else
> ltvi.statepictureindex = 1
> end if
> This.SetItem(il_LastHandle,ltvi)
> END IF
> This.GetItem(Handle,ltvi)
> ltvi.statepictureindex = 3
> ls_filter = "object_qualified_name = '" + ltvi.data + "'"
> dw_2.SetFilter(ls_filter)
> dw_2.Filter()
> IF dw_2.RowCount() > 0 then
> dw_2.setrow(1)
> dw_1.retrieve(dw_2.GetItemNumber(1,"object_id"))
> else
> dw_1.retrieve(0)
> end if
> il_LastHandle = handle
> end if
>
>
> "Arnoud" <arnoud_nospam@gloriant.be> wrote in message
> news:uQaZWzJ#CHA.287@forums-1-dub...
> > Hi,
> >
> > Make sure that the 'checkbox' property of the treeview control is NOT
> > checked.
> > When this propery is checked it uses the statepicture to display the
> system
> > defined check boxes (2-state)
> > If you want 3-state checkboxes you'll have to code it yourself ( You'll
> have
> > to check the X-pos of the mouse pointer in the clicked event and switch
> > state pictures accordingly.)
> >
> >
> > --
> > HTH
> >
> > Arnoud
> > Url: http://www.gloriant.be
> > Also check out my PB Reference site : http://www.pbinfo.be
> > "Renan HENRY" <rhenry@phj.fr> wrote in message
> > news:#cpn$tC#CHA.324@forums-1-dub...
> > > Hello all,
> > > I've got a TreeView.
> > > At first time, I display the TreeView without StatePictures (normal
> mod).
> > > Via the popmenu, the user can pass to admin mod, and I want to display
> the
> > > TreeView with StatePictures... with my StatePictures. (I've got 3
> > StatePictures,
> > > uncheck, check, and grey) But It display some 2 icons (check and
> uncheck)
> > only,
> > > and those icons aren't the good.
> > > I can display my icons only if those are display at the beginning but
> > after
> > > change the checkboxes properties I can't show my icons.
> > >
> > > anybody know about it?
> > >
> > > Thks.
> > >
> > > Renan HENRY
> > > http://www.phj.fr
> > > rhenry@phj.fr
> >
> >
>
>


Tyler Posted on 2003-04-02 13:18:09.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Tyler" <NoSpamPlease_tcraft@gnb.ca>
Subject: Re: Problem with TreeView StatePictureIndex (PB7)
Date: Wed, 2 Apr 2003 09:18:09 -0400
Lines: 140
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 182.27.gnb.ca 142.139.182.27
Message-ID: <364_eej#mqR#CHA.52@forums-1-dub>
References: <364_#cpn$tC#CHA.324@forums-1-dub> <364_uQaZWzJ#CHA.287@forums-1-dub> <364_uoRqrUR#CHA.333@forums-2-dub> <364_#WY$qnR#CHA.333@forums-2-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7303
Article PK: 734590

It would be a simple case statement when the user clicks on the Item
Choose Case ltvi.statepictureindex
case 1
ltvi.statepictureindex = 2
case 2
ltvi.statepictureindex = 3
case 3
ltvi.statepictureindex = 1
End Choose

I still dont understand the X-pos, but I would like to maybe I am doing this
wrong.

Tyler

"Arnoud Oortwijk" <gloriant_NOSPAM@skynet.be> wrote in message
news:#WY$qnR#CHA.333@forums-2-dub...
> Renan cannot use the checkboxes as implemented in PB treeview because they
> only support 2-states. Therefore the checkbox property should not be
> checked.
> If he still wants to simulate the behaviour that when a user clicks on the
> statepicture that the state of the checkbox (bitmap) changes, he'll have
to
> code it himself.
> To avoid changing the 'checkbox state' when the user clicks the label or
the
> cross to expand/collapse the item he'll have to check the X-pos of the
mouse
> pointer.
>
> As I understand he if the user clicks the state picture multiple times
> without placing the focus on another treeview item the state picture
should
> change 1,2,3 and back to 1.
>
> I don't see anything in your code that processes the click of the mouse on
> the state picture. You only change the statepicture when the treeviewitem
> gains or loses focus.
>
> --
> HTH
>
> Arnoud
> Url: http://www.gloriant.be
> PB Reference: http://www.pbinfo.be
>
>
> "Tyler" <NoSpamPlease_tcraft@gnb.ca> wrote in message
> news:uoRqrUR#CHA.333@forums-2-dub...
> > I agree that the checkbox property has to be checked, but I don't see
what
> > you mean by the X-pos of the mouse. I use three statepictures:
> > 1 = Folder Closed
> > 2 = Folder Open
> > 3 = Arrow Indicating current Item
> > If handle > 0 then
> > I handle it in the clicked event as follows
> > IF il_LastHandle > 0 THEN
> > This.GetItem(il_LastHandle,ltvi)
> > if ltvi.Expanded = true then
> > ltvi.statepictureindex = 2
> > else
> > ltvi.statepictureindex = 1
> > end if
> > This.SetItem(il_LastHandle,ltvi)
> > END IF
> > This.GetItem(Handle,ltvi)
> > ltvi.statepictureindex = 3
> > ls_filter = "object_qualified_name = '" + ltvi.data + "'"
> > dw_2.SetFilter(ls_filter)
> > dw_2.Filter()
> > IF dw_2.RowCount() > 0 then
> > dw_2.setrow(1)
> > dw_1.retrieve(dw_2.GetItemNumber(1,"object_id"))
> > else
> > dw_1.retrieve(0)
> > end if
> > il_LastHandle = handle
> > end if
> >
> >
> > "Arnoud" <arnoud_nospam@gloriant.be> wrote in message
> > news:uQaZWzJ#CHA.287@forums-1-dub...
> > > Hi,
> > >
> > > Make sure that the 'checkbox' property of the treeview control is NOT
> > > checked.
> > > When this propery is checked it uses the statepicture to display the
> > system
> > > defined check boxes (2-state)
> > > If you want 3-state checkboxes you'll have to code it yourself (
You'll
> > have
> > > to check the X-pos of the mouse pointer in the clicked event and
switch
> > > state pictures accordingly.)
> > >
> > >
> > > --
> > > HTH
> > >
> > > Arnoud
> > > Url: http://www.gloriant.be
> > > Also check out my PB Reference site : http://www.pbinfo.be
> > > "Renan HENRY" <rhenry@phj.fr> wrote in message
> > > news:#cpn$tC#CHA.324@forums-1-dub...
> > > > Hello all,
> > > > I've got a TreeView.
> > > > At first time, I display the TreeView without StatePictures (normal
> > mod).
> > > > Via the popmenu, the user can pass to admin mod, and I want to
display
> > the
> > > > TreeView with StatePictures... with my StatePictures. (I've got 3
> > > StatePictures,
> > > > uncheck, check, and grey) But It display some 2 icons (check and
> > uncheck)
> > > only,
> > > > and those icons aren't the good.
> > > > I can display my icons only if those are display at the beginning
but
> > > after
> > > > change the checkboxes properties I can't show my icons.
> > > >
> > > > anybody know about it?
> > > >
> > > > Thks.
> > > >
> > > > Renan HENRY
> > > > http://www.phj.fr
> > > > rhenry@phj.fr
> > >
> > >
> >
> >
>
>


Arnoud Oortwijk Posted on 2003-04-02 13:54:22.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Arnoud Oortwijk" <gloriant_NOSPAM@skynet.be>
Subject: Re: Problem with TreeView StatePictureIndex (PB7)
Date: Wed, 2 Apr 2003 15:54:22 +0200
Lines: 163
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: default.eu.s1.com 194.74.111.206
Message-ID: <364_#i$Xw#R#CHA.287@forums-1-dub>
References: <364_#cpn$tC#CHA.324@forums-1-dub> <364_uQaZWzJ#CHA.287@forums-1-dub> <364_uoRqrUR#CHA.333@forums-2-dub> <364_#WY$qnR#CHA.333@forums-2-dub> <364_eej#mqR#CHA.52@forums-1-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7304
Article PK: 734594

Because the statepicture should only change when it is clicked upon, not
when the user clicks the treeview items label which also triggers the
clicked event.

--
HTH

Arnoud
Url: http://www.gloriant.be
PB Reference: http://www.pbinfo.be

"Tyler" <NoSpamPlease_tcraft@gnb.ca> wrote in message
news:eej#mqR#CHA.52@forums-1-dub...
> It would be a simple case statement when the user clicks on the Item
> Choose Case ltvi.statepictureindex
> case 1
> ltvi.statepictureindex = 2
> case 2
> ltvi.statepictureindex = 3
> case 3
> ltvi.statepictureindex = 1
> End Choose
>
> I still dont understand the X-pos, but I would like to maybe I am doing
this
> wrong.
>
> Tyler
>
>
> "Arnoud Oortwijk" <gloriant_NOSPAM@skynet.be> wrote in message
> news:#WY$qnR#CHA.333@forums-2-dub...
> > Renan cannot use the checkboxes as implemented in PB treeview because
they
> > only support 2-states. Therefore the checkbox property should not be
> > checked.
> > If he still wants to simulate the behaviour that when a user clicks on
the
> > statepicture that the state of the checkbox (bitmap) changes, he'll have
> to
> > code it himself.
> > To avoid changing the 'checkbox state' when the user clicks the label or
> the
> > cross to expand/collapse the item he'll have to check the X-pos of the
> mouse
> > pointer.
> >
> > As I understand he if the user clicks the state picture multiple times
> > without placing the focus on another treeview item the state picture
> should
> > change 1,2,3 and back to 1.
> >
> > I don't see anything in your code that processes the click of the mouse
on
> > the state picture. You only change the statepicture when the
treeviewitem
> > gains or loses focus.
> >
> > --
> > HTH
> >
> > Arnoud
> > Url: http://www.gloriant.be
> > PB Reference: http://www.pbinfo.be
> >
> >
> > "Tyler" <NoSpamPlease_tcraft@gnb.ca> wrote in message
> > news:uoRqrUR#CHA.333@forums-2-dub...
> > > I agree that the checkbox property has to be checked, but I don't see
> what
> > > you mean by the X-pos of the mouse. I use three statepictures:
> > > 1 = Folder Closed
> > > 2 = Folder Open
> > > 3 = Arrow Indicating current Item
> > > If handle > 0 then
> > > I handle it in the clicked event as follows
> > > IF il_LastHandle > 0 THEN
> > > This.GetItem(il_LastHandle,ltvi)
> > > if ltvi.Expanded = true then
> > > ltvi.statepictureindex = 2
> > > else
> > > ltvi.statepictureindex = 1
> > > end if
> > > This.SetItem(il_LastHandle,ltvi)
> > > END IF
> > > This.GetItem(Handle,ltvi)
> > > ltvi.statepictureindex = 3
> > > ls_filter = "object_qualified_name = '" + ltvi.data + "'"
> > > dw_2.SetFilter(ls_filter)
> > > dw_2.Filter()
> > > IF dw_2.RowCount() > 0 then
> > > dw_2.setrow(1)
> > > dw_1.retrieve(dw_2.GetItemNumber(1,"object_id"))
> > > else
> > > dw_1.retrieve(0)
> > > end if
> > > il_LastHandle = handle
> > > end if
> > >
> > >
> > > "Arnoud" <arnoud_nospam@gloriant.be> wrote in message
> > > news:uQaZWzJ#CHA.287@forums-1-dub...
> > > > Hi,
> > > >
> > > > Make sure that the 'checkbox' property of the treeview control is
NOT
> > > > checked.
> > > > When this propery is checked it uses the statepicture to display the
> > > system
> > > > defined check boxes (2-state)
> > > > If you want 3-state checkboxes you'll have to code it yourself (
> You'll
> > > have
> > > > to check the X-pos of the mouse pointer in the clicked event and
> switch
> > > > state pictures accordingly.)
> > > >
> > > >
> > > > --
> > > > HTH
> > > >
> > > > Arnoud
> > > > Url: http://www.gloriant.be
> > > > Also check out my PB Reference site : http://www.pbinfo.be
> > > > "Renan HENRY" <rhenry@phj.fr> wrote in message
> > > > news:#cpn$tC#CHA.324@forums-1-dub...
> > > > > Hello all,
> > > > > I've got a TreeView.
> > > > > At first time, I display the TreeView without StatePictures
(normal
> > > mod).
> > > > > Via the popmenu, the user can pass to admin mod, and I want to
> display
> > > the
> > > > > TreeView with StatePictures... with my StatePictures. (I've got 3
> > > > StatePictures,
> > > > > uncheck, check, and grey) But It display some 2 icons (check and
> > > uncheck)
> > > > only,
> > > > > and those icons aren't the good.
> > > > > I can display my icons only if those are display at the beginning
> but
> > > > after
> > > > > change the checkboxes properties I can't show my icons.
> > > > >
> > > > > anybody know about it?
> > > > >
> > > > > Thks.
> > > > >
> > > > > Renan HENRY
> > > > > http://www.phj.fr
> > > > > rhenry@phj.fr
> > > >
> > > >
> > >
> > >
> >
> >
>
>