Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird problems with the locator grid
Message
De
05/01/2004 09:28:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00863811
Message ID:
00863841
Vues:
11
>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:
*Form.init
with this.LocatorGrid1 && lKeepFormat = .t. at designtime
  .cSQL = 'cust_id,company,contact from customer'
  .Init()
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform