I've just got a datawindow, and dropped a bBrowser control onto it via the WED. How do I change the order and width of each column please? I worked out the captions, but can't see how to set the default column order and widths...
Any ideas please?
bBrowser 4 tweaks
bBrowser 4 tweaks
Hi Jeff,
you have to do it manually.
I'm using this method to simplify:
And yes, this code works also in the X# version of bBrowser.
Wolfgang
you have to do it manually.
I'm using this method to simplify:
Code: Select all
method AddColumn( cCaption, uField, symType, nWidth, nAlignment ) class StdBrowser
//p Spalte hinzufügen mit möglichst wenig Code
//s
local oColumn as bDataColumn
oColumn := bDataColumn{ oDCGrid, _oDBServer, uField, IIf( IsSymbol( symType ), symType, #field ) }
oColumn:Caption := cCaption
if IsNumeric( nWidth )
oColumn:Width := nWidth
endif
if IsNumeric( nAlignment ) .and. nAlignment >= 0
if oColumn:DataView == null_object
oColumn:DataView := bViewStyle{ ,, nAlignment }
else
oColumn:DataView:Alignment := nAlignment
endif
if oColumn:CaptionView == null_object
oColumn:CaptionView := bViewStyle{ ,, nAlignment }
else
oColumn:CaptionView:Alignment := nAlignment
endif
endif
oDCGrid:AddColumn( oColumn )
oDCGrid:OpenColumn( oColumn )
return oColumn
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
bBrowser 4 tweaks
Thank you very much Wolfgang, I'll give that a try.
Question, I get it needs to be done manually, but how do I pass the parameters? The bBrowser was put on the window via the WED, but I can't see where to pass any parameters
Question, I get it needs to be done manually, but how do I pass the parameters? The bBrowser was put on the window via the WED, but I can't see where to pass any parameters
bBrowser 4 tweaks
Hi Jeff,
this has to be done in the Init() method of your window.
But there are samples in the bBrowser documentation how it needs to be used.
Wolfgang
this has to be done in the Init() method of your window.
But there are samples in the bBrowser documentation how it needs to be used.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it