show a string into xbrowse

show a string into xbrowse

Postby Silvio.Falconi » Thu Dec 07, 2023 11:24 am

I have a field numeric and I wish show the string + "gg"

:bEditValue :={ || str(oBrw:aArrayData[ oBrw:nArrayAt,1])+"gg" }

why not run ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: show a string into xbrowse

Postby nageswaragunupudi » Thu Dec 07, 2023 12:57 pm

Simpler way is:
Code: Select all  Expand view  RUN
oCol:cEditPicture := "###gg"
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10655
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: show a string into xbrowse

Postby Silvio.Falconi » Tue Dec 12, 2023 10:45 am

nageswaragunupudi wrote:Simpler way is:
Code: Select all  Expand view  RUN
oCol:cEditPicture := "###gg"


run only the last element

Image


sample
cstring:= "30/60/90"

aData := hb_ATokens(cString,"/")

@ 10, 5 XBROWSE oBrw OF oDlg ;
COLUMNS 1,2;
HEADERS "gg","" ;
COLSIZES 40, 220 ;
ARRAY aData ;
SIZE -5,-100 PIXEL STYLE FLAT NOBORDER

WITH OBJECT oBrw
WITH OBJECT oBrw:aCols[1]
:cEditPicture := "###gg"
END
:lHScroll := .f.
:CreateFromCode()
END
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: show a string into xbrowse

Postby nageswaragunupudi » Tue Dec 12, 2023 12:24 pm

I have a field numeric and I wish show the string + "gg"


Your question was to display "numeric" values with suffix "gg".
The suggestion of oCol:cEditPicture := "###gg" works for numeric values but not character values

In your code:
Code: Select all  Expand view  RUN
cstring:= "30/60/90"

aData := hb_ATokens(cString,"/")

@ 10, 5 XBROWSE oBrw OF oDlg ;
COLUMNS 1,2;
HEADERS "gg","" ;
COLSIZES 40, 220 ;
ARRAY aData ;
SIZE -5,-100 PIXEL STYLE FLAT NOBORDER

WITH OBJECT oBrw
WITH OBJECT oBrw:aCols[1]
:cEditPicture := "###gg"
END
:lHScroll := .f.
:CreateFromCode()
END
 


all elements of aData are character values.

So please do:
Code: Select all  Expand view  RUN
  aData := HB_ATokens( cString, "/" )
   AEval( aData, { |c,i| aData[ i ] := Val( c ) } )
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10655
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: show a string into xbrowse

Postby Silvio.Falconi » Tue Dec 12, 2023 12:27 pm

thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 23 guests