Hi,
I have a browse with hidden columns. How can I get ALL the columns of the browse? Seems as colcount doesn't show the hidden columns.
oBrowse:colcount hidden columns
Re: oBrowse:colcount hidden columns
A browse can't hide columns. If you use the HIDE clause with eXpress++, the columns are deleted and added again, depending on the result of the HIDE-clause.
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: oBrowse:colcount hidden columns
Hi,
Tom, browse columns can be hidden/shown, but not in eXpress++. Roger use simple oCol:hide()/oCol:show() for that, but it does not do the task well. I described how to do that correctly in this post:
viewtopic.php?f=2&t=3211
Cris, to get all columns in a browser you can use this: oCol:setParent():childList(), where oCol is any column in a browser.
You can also use this: oBrw:aColumns, where :aColumns is a READONLY variable.
Slavko
Tom, browse columns can be hidden/shown, but not in eXpress++. Roger use simple oCol:hide()/oCol:show() for that, but it does not do the task well. I described how to do that correctly in this post:
viewtopic.php?f=2&t=3211
Cris, to get all columns in a browser you can use this: oCol:setParent():childList(), where oCol is any column in a browser.
You can also use this: oBrw:aColumns, where :aColumns is a READONLY variable.
Slavko
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: oBrowse:colcount hidden columns
Hi Tom, Slavko,
Thanks for the insights.
Thanks for the insights.
Re: oBrowse:colcount hidden columns
I added the ability to collapse and restore columns in SqlQuery.prg.
Your columns would need to first use the DCBROWSECOL .. SUBCLASS 'DD_XbpBrowseFiltered()'
Your columns would need to first use the DCBROWSECOL .. SUBCLASS 'DD_XbpBrowseFiltered()'
Code: Select all
CLASS DD_XbpColumnFiltered FROM DC_XbpColumnFiltered
EXPORTED:
VAR nColumnWidth
VAR isCollapsed
INLINE METHOD Init(a,b,c,d,e,f,g)
LOCAL oColumn
::isCollapsed := .f.
oColumn :=::DC_XbpColumnFiltered:init(a,b,c,d,e,f,g)
::isColumnConfigEnabled := .t.
RETURN oColumn
* -----------
INLINE METHOD Collapse( lResizeBrowse )
DEFAULT lResizeBrowse := .t.
IF !::isCollapsed
::nColumnWidth := ::currentSize()[1]
::setSize({0,::currentSize()[2]})
::hide()
::isCollapsed := .t.
IF lResizeBrowse
::parent:setSize(::parent:currentSize())
ENDIF
ENDIF
RETURN self
* ------------
INLINE METHOD Restore( lResizeBrowse )
DEFAULT lResizeBrowse := .t.
IF ::isCollapsed
::setSize({::nColumnWidth,::currentSize()[2]})
::show()
::isCollapsed := .f.
IF lResizeBrowse
::parent:setSize(::parent:currentSize())
ENDIF
ENDIF
RETURN self
ENDCLASS
The eXpress train is coming - and it has more cars.