>Hi Cetin,
>
>I'm using VFP7 and your locator grid once again.
>
>I want a header of a column to be to multiline, when I set wraparound to .t. the heading looks fine on the screen when i'm editing the form.
>
>However, when I run the form, the heading is not wraparound?
>
>Also, when I adjust a column width on the grid, sometimes it not changed to how it looks at design time?
>
>What am I missing?
>
>Best Regards
>Robin
Robin,
WordWrap is my fault :)
To do the change at class level edit SaveProps method both in LocatorGrid and MultiSelectGrid classes. Add "WORDWRAP" to list by modifying code From :
FOR jx=1 to nMembers
if inlist(aProperties[jx],"FONT","ALIGNMENT","CAPTION")
To :
FOR jx=1 to nMembers
if inlist(aProperties[jx],"FONT","ALIGNMENT","CAPTION","WORDWRAP")
You'd see almost the same code block in myHeader.prg (procedure init). Also edit there to include "WORDWRAP".
While it might seem unnecessary repeating of code in 3 places I had a reason to do so by then (but don't remember the reason now:).
For 2nd part, be sure lKeepFormat = .t. to keep widths. If you're assigning a new cSQL through code, then be sure to call class::init. ie:
with this.LocatorGrid1
.cSQL = 'cust_id,company,contact from customer'
.Init()
endwith
Cetin