Marco,
>ADD TO oBrw BITMAP DATA aArray[oBrw:nAt(),1]
Try looking at the PPO file.
James
About oBrw:AddColumn
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
While we need to write this kind of code for twbrowse or tcbrowse, xbrowse made browing arrays very simple.
The command :
is all that is needed to browse the entire array.
If we like to browse only selected columns, say 3rd, 2nd and 5th columns only of the array
is enough. Even the array elements can be of any datatype, xbrowse handles the necessary conversions.
If we still want to use the traditional tcbrowse command syntax, that is also possible to add columns ( even to insert the new column ).
If we prefer to continue the old TXBrowse way of using methods and data,
No need to code with oBrw:aArrayData oBrw:nArrayAt or oBrw:nAt(), etc. though thiose options are still available if we enjoy writing long pages of code.
In addition we have facilities like autosort, report, export to excel, etc.
Xbrowse command syntax is almost similar to ListBox and TCBrowse syntaxes, so that we write the code the familiar way but in just a fewer lines than what is necessary with earlier xbrowse or its elder brothers wbrowse or tcbrowse.
When I am converting my earlier xbrowse code using the new facilities, multiple pages of code is now fitting into a page or less. Better readability and easy to maintain.
8.03 allows browsing blank recordsets. Wish we can browse blank arrays too in some way.
The command :
Code: Select all
@ 0,0 XBROWSE oBrw OF oWnd ARRAY aData AUTOCOLS
If we like to browse only selected columns, say 3rd, 2nd and 5th columns only of the array
Code: Select all
@ 0,0 XBROWSE oBrw ;
COLUMNS 3, 2, 5 ;
HEADERS "First", "Second", "Third" ;
OF oWnd ;
ARRAY aData
If we still want to use the traditional tcbrowse command syntax, that is also possible to add columns ( even to insert the new column ).
If we prefer to continue the old TXBrowse way of using methods and data,
Code: Select all
oCol := oBrw:AddCol()
oCol:nArryCol := 5 // this is enough
// Instead of the earlier
// oCol:bStrData := {|| cValToChar( oBrw:aArrayData[ oBrw:nArrayAt ] ) }
// Writing this for eacj column
// or looping through the array to build the blocks taking advantage of detached locals
In addition we have facilities like autosort, report, export to excel, etc.
Xbrowse command syntax is almost similar to ListBox and TCBrowse syntaxes, so that we write the code the familiar way but in just a fewer lines than what is necessary with earlier xbrowse or its elder brothers wbrowse or tcbrowse.
When I am converting my earlier xbrowse code using the new facilities, multiple pages of code is now fitting into a page or less. Better readability and easy to maintain.
8.03 allows browsing blank recordsets. Wish we can browse blank arrays too in some way.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact: