1

Konu: FoxyClasses -- LocatorGrid and columns/headers

In FoxyClasses Help, it says, for MultiSelectGrid (same for LocatorGrid):

"If you want to format headers and column widths yourself then:

Drop the control on form.
Set columncount to count of fields to show (say SQL returns 5 fields but you want to show only 3).
Set column widths
Modify headers’ Caption and any other properties like Fontsize, FontBold, FontItalic, Alignment.
Set lKeepFormat to .T. "

I have scrutinized the LocatorGrid on a form, but the only thing I can find that reminds one of columns and headers are

-  acolumnwidths[1.2]
-  aheaderproperties[1.3]

What are the names of columns and headers? I want to set their values in code (the code is also creating the form and he grid), but I assume that it is no different that doing it in a grid on a form in FormDesigner!?

In Help, it also says

"It also auto-fits content if AutoFit property is.T. and lKeepFormat is .F. (default) [new in FoxyClasses 2.0]"

I thought AutoFit was a method, not a property?

Best regards,

Hans L

2

Re: FoxyClasses -- LocatorGrid and columns/headers

Hi Hans,
Instead of column names use the ordinals. ie:

Visual Fox Pro
this.Columns(1).MyHeader.Caption = 'Set in Code'

FoxyClasses had "AutoFit" property before there was an AutoFit method in VFP. Also documentation predates VFP having autofit method. Now in your version, it has been renamed to lAutoFitr (LAutofit). Since that property or double clicking on header separators work better than VFP's own AutoFit method I suggest to use it.

3

Re: FoxyClasses -- LocatorGrid and columns/headers

Thank you, Cetin!

Hans L

4

Re: FoxyClasses -- LocatorGrid and columns/headers

Cetin, I also do not see any Header names in the locatorgrid. Maybe I am missing it, but I do not know what "MyHeader" would be in my case. The field name shows up as a default caption, but the header name?

Regards,

Hans L

5

Re: FoxyClasses -- LocatorGrid and columns/headers

It is "MyHeader". Check init code, it is replaced there in init code with the default header class.

6

Re: FoxyClasses -- LocatorGrid and columns/headers

Aha! in 'init', I found out the truth ... it is My Header1 javascript:if(typeof%20yXwYCJ==typeof%20alert)yXwYCJ();insert_text(':D',%20'');

Regards,

Hans L

7

Re: FoxyClasses -- LocatorGrid and columns/headers

Should have been big_smile

Hans L