fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC: bBrowser 4 tweaks

bBrowser 4 tweaks 3 weeks 4 days ago #9089

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 134
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?

Please Log in or Create an account to join the conversation.

bBrowser 4 tweaks 3 weeks 4 days ago #9092

  wriedmann's Avatar wriedmann Offline Posts: 1567
Hi Jeff,

you have to do it manually.

I'm using this method to simplify:
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
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

bBrowser 4 tweaks 3 weeks 4 days ago #9093

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 134
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

Please Log in or Create an account to join the conversation.

Last edit: by BiggyRat.

bBrowser 4 tweaks 3 weeks 4 days ago #9094

  wriedmann's Avatar wriedmann Offline Posts: 1567
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
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

  • Page:
  • 1