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.

Modify Picture in DataWindow

5 posts in DataWindow Last posting was on 2009-12-30 16:33:21.0Z
JZ Posted on 2009-12-30 15:24:31.0Z
Sender: 26a9.4b390435.1804289383@sybase.com
From: JZ
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Modify Picture in DataWindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b3b70af.71d3.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 30 Dec 2009 07:24:31 -0800
X-Trace: forums-1-dub 1262186671 10.22.241.41 (30 Dec 2009 07:24:31 -0800)
X-Original-Trace: 30 Dec 2009 07:24:31 -0800, 10.22.241.41
Lines: 13
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90507
Article PK: 410109

I am trying to modify the file name of a picture box located
in a datawindow each time a row changes focus. The name of
my DataWindow is dw_data2. The name of the picture box is
p_1 and ls_Bitmap contains a path to the .bmp file. I tried
this in the rowfocuschanged event... but it doesn't seem to
be working.

dw_data2.Modify("p_1.File = " + ls_Bitmap)


Thanks for your help,

JZ


AJ Posted on 2009-12-30 16:26:29.0Z
Sender: 73ec.4b3b7eb9.1804289383@sybase.com
From: Aj
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify Picture in DataWindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b3b7f35.73f8.1681692777@sybase.com>
References: <4b3b70af.71d3.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 30 Dec 2009 08:26:29 -0800
X-Trace: forums-1-dub 1262190389 10.22.241.41 (30 Dec 2009 08:26:29 -0800)
X-Original-Trace: 30 Dec 2009 08:26:29 -0800, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90508
Article PK: 410113


> I am trying to modify the file name of a picture box
> located in a datawindow each time a row changes focus.
> The name of my DataWindow is dw_data2. The name of the
> picture box is p_1 and ls_Bitmap contains a path to the
> bmp file. I tried this in the rowfocuschanged event...
> but it doesn't seem to be working.
>
> dw_data2.Modify("p_1.File = " + ls_Bitmap)
>
>
> Thanks for your help,
>
> JZ

Please try this:
A computed field (typed on one line) using the Bitmap,
CurrentRow, and GetRow functions:

Bitmap(If(CurrentRow()= GetRow(),
"c:\sampl\ex\code\indicatr.bmp", " "))

displays an arrow bitmap for the current row and no bitmap
for all other rows.

Check Bitmap DataWindow expression function in online
Powerbuilder help for further info.


JZ Posted on 2009-12-30 16:29:32.0Z
Sender: 26a9.4b390435.1804289383@sybase.com
From: JZ
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify Picture in DataWindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b3b7fec.740b.1681692777@sybase.com>
References: <4b3b70af.71d3.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 30 Dec 2009 08:29:32 -0800
X-Trace: forums-1-dub 1262190572 10.22.241.41 (30 Dec 2009 08:29:32 -0800)
X-Original-Trace: 30 Dec 2009 08:29:32 -0800, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90509
Article PK: 410114

I was able to get this working without using the variable
that holds the path and hardcoding the path...I used

dw_data2.Modify("p_1.Filename='T:\2009123008475815.bmp'")

However, I still can't get it to work with the variable
which is what I need. I tried..

dw_data2.Modify("p_1.Filename=" + ls_Bitmap)

but it doesn't work

> I am trying to modify the file name of a picture box
> located in a datawindow each time a row changes focus.
> The name of my DataWindow is dw_data2. The name of the
> picture box is p_1 and ls_Bitmap contains a path to the
> bmp file. I tried this in the rowfocuschanged event...
> but it doesn't seem to be working.
>
> dw_data2.Modify("p_1.File = " + ls_Bitmap)
>
>
> Thanks for your help,
>
> JZ


Jason 'Bug' Fenter [TeamSybase] Posted on 2009-12-30 16:31:38.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1pre Thunderbird/3.0
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify Picture in DataWindow
References: <4b3b70af.71d3.1681692777@sybase.com> <4b3b7fec.740b.1681692777@sybase.com>
In-Reply-To: <4b3b7fec.740b.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b3b806a$1@forums-1-dub>
Date: 30 Dec 2009 08:31:38 -0800
X-Trace: forums-1-dub 1262190698 10.22.241.152 (30 Dec 2009 08:31:38 -0800)
X-Original-Trace: 30 Dec 2009 08:31:38 -0800, vip152.sybase.com
Lines: 30
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90510
Article PK: 410115

You're missing quotes.
dw_data2.Modify("p_1.Filename='" + ls_Bitmap + "'")

On 12/30/2009 10:29 AM, JZ wrote:
> I was able to get this working without using the variable
> that holds the path and hardcoding the path...I used
>
> dw_data2.Modify("p_1.Filename='T:\2009123008475815.bmp'")
>
> However, I still can't get it to work with the variable
> which is what I need. I tried..
>
> dw_data2.Modify("p_1.Filename=" + ls_Bitmap)
>
> but it doesn't work
>
>> I am trying to modify the file name of a picture box
>> located in a datawindow each time a row changes focus.
>> The name of my DataWindow is dw_data2. The name of the
>> picture box is p_1 and ls_Bitmap contains a path to the
>> bmp file. I tried this in the rowfocuschanged event...
>> but it doesn't seem to be working.
>>
>> dw_data2.Modify("p_1.File = " + ls_Bitmap)
>>
>>
>> Thanks for your help,
>>
>> JZ


JZ Posted on 2009-12-30 16:33:21.0Z
Sender: 741c.4b3b807c.1804289383@sybase.com
From: JZ
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify Picture in DataWindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b3b80d1.7425.1681692777@sybase.com>
References: <4b3b806a$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 30 Dec 2009 08:33:21 -0800
X-Trace: forums-1-dub 1262190801 10.22.241.41 (30 Dec 2009 08:33:21 -0800)
X-Original-Trace: 30 Dec 2009 08:33:21 -0800, 10.22.241.41
Lines: 33
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90511
Article PK: 410116

Thanks so much for providing another set of eyes. That did
the trick.

> You're missing quotes.
> dw_data2.Modify("p_1.Filename='" + ls_Bitmap + "'")
>
>
> On 12/30/2009 10:29 AM, JZ wrote:
> > I was able to get this working without using the
> > variable that holds the path and hardcoding the path...I
> used >
> >
> dw_data2.Modify("p_1.Filename='T:\2009123008475815.bmp'")
> > > However, I still can't get it to work with the
> > variable which is what I need. I tried..
> >
> > dw_data2.Modify("p_1.Filename=" + ls_Bitmap)
> >
> > but it doesn't work
> >
> >> I am trying to modify the file name of a picture box
> >> located in a datawindow each time a row changes focus.
> >> The name of my DataWindow is dw_data2. The name of the
> >> picture box is p_1 and ls_Bitmap contains a path to the
> >> bmp file. I tried this in the rowfocuschanged event...
> >> but it doesn't seem to be working.
> >>
> >> dw_data2.Modify("p_1.File = " + ls_Bitmap)
> >>
> >>
> >> Thanks for your help,
> >>
> >> JZ