FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour show a string into xbrowse
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
show a string into xbrowse
Posted: 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 March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: show a string into xbrowse
Posted: Thu Dec 07, 2023 12:57 PM
Simpler way is:
Code (fw): Select all Collapse
oCol:cEditPicture := "###gg"
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: show a string into xbrowse
Posted: Tue Dec 12, 2023 10:45 AM
nageswaragunupudi wrote:Simpler way is:
Code (fw): Select all Collapse
oCol:cEditPicture := "###gg"
run only the last element




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 March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: show a string into xbrowse
Posted: 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 (fw): Select all Collapse
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 (fw): Select all Collapse
   aData := HB_ATokens( cString, "/" )
   AEval( aData, { |c,i| aData[ i ] := Val( c ) } )
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: show a string into xbrowse
Posted: Tue Dec 12, 2023 12:27 PM

thanks

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion