bBrowser 4 tweaks

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
Anonymous

bBrowser 4 tweaks

Post by Anonymous »

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?
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

bBrowser 4 tweaks

Post by wriedmann »

Hi Jeff,

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
And yes, this code works also in the X# version of bBrowser.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
BiggyRat

bBrowser 4 tweaks

Post by BiggyRat »

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
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

bBrowser 4 tweaks

Post by wriedmann »

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
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply