Page 1 of 1

How have a value from Xbrowse with array

Posted: Wed Jan 20, 2010 12:02 pm
by Silvio
to return a value from array I use

ON DBLCLICK Inser_Img( oBrw:aArrayData[oBrw:nArrayAt,1] )

BUT return only the record of the first column and not the record I selected : How I must make to have therecord selected ?

then

it return ".\bitmaps\test.bmp" How I can make to have all Path of this bitmap ?

sample c:\test\bitmaps\test.bmp ?

THANKS

Re: How have a value from Xbrowse with array

Posted: Wed Jan 20, 2010 12:23 pm
by ukoenig
Hello Silvio,

There are some Filefunctions in FWH

cFileNoPath( <cFullFileName> ) --> cFileName
Returns:
<cFileName> Just the filename specified inside the full filename

Path-Convert :
cFull := CURDRIVE() + ":\" + GETCURDIR() + "\" + cFileNoPath( ".\test\test.bmp" )
msgalert( cFull ) => c:\test\test.bmp

For full Path i use a Var inside my Applications :
--------------------------------------------------------
c_path := CURDRIVE() + ":\" + GETCURDIR()
DEFINE IMAGE oImage FILENAME c_path + "\BACKGRD.JPG"
Filename uses : c:\test\BACKGRD.JPG

Best Regards
Uwe :lol:

Re: How have a value from Xbrowse with array

Posted: Wed Jan 20, 2010 12:28 pm
by Detlef Hoefner
Silvio,

try

Code: Select all

oBrw:aRow[ n ]
where n is the desired column.

hth,
Detlef

Re: How have a value from Xbrowse with array

Posted: Wed Jan 20, 2010 2:07 pm
by nageswaragunupudi

Code: Select all

? oBrw:aArrayData[ oBrw:nArrayAt, n ]
or 
? oBrw:aRow[ n ]
 
are the same.
Better is

Code: Select all

? oBrw:SelectedCol():Value   // to query and
oBrw:SelectedCol():Value := uNewValue // assign a new value
 
The last method works whatever is the data source ( array, rdd, rs, etc).