#include "dcdialog.ch"
FUNCTION MyBrowse()
LOCAL GetList[0], GetOptions, oBrowse
LOCAL aDir := Directory()
@ 0, 0 DCBROWSE oBrowse DATA aDir SIZE 20,10 FIT
DCBROWSECOL ELEMENT 1 HEADER 'File Name' WIDTH 10 PARENT oBrowse
DCBROWSECOL ELEMENT 2 HEADER 'File Size' WIDTH 11 PARENT oBrowse
DCBROWSECOL ELEMENT 3 HEADER 'File Date' WIDTH 12 PARENT oBrowse
DCBROWSECOL ELEMENT 4 HEADER 'File Time' WIDTH 13 PARENT oBrowse
DCREAD GUI FIT TITLE 'Zebra Colors on Browse'
RETURN nil
*
In the sample program above:
1. How can I retrieve the Column Headers i.e. 'File Name', 'File Size' from the oBrowse object at runtime ?
2. How can I retrieve the Column Width i.e. 10, 11, 12, 13 from the oBrowse object at runtime ?
HOW TO GET BROWSE COLUMN HEADING AT RUNTIME ?
Re: HOW TO GET BROWSE COLUMN HEADING AT RUNTIME ?
oBrowse:GetColumn(nColNo):Heading:GetCell(1) -> Column header
oBrowse:GetColumn(nColNo):CurrentSize()[1] -> Column width (in pixel)
oBrowse:GetColumn(nColNo):CurrentSize()[1] -> Column width (in pixel)
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: HOW TO GET BROWSE COLUMN HEADING AT RUNTIME ?
Thanks tom
Now concerning the column with that returns PIXEL, which function can I use to convert PIXEL to DECIMAL ?
Now concerning the column with that returns PIXEL, which function can I use to convert PIXEL to DECIMAL ?
Re: HOW TO GET BROWSE COLUMN HEADING AT RUNTIME ?
Multiplication.
By default, a "column" has 7 pixel, a "line" has 20 - in eXpress++. As long as you didn't change this in your app.

By default, a "column" has 7 pixel, a "line" has 20 - in eXpress++. As long as you didn't change this in your app.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."