Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid columns autofit
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00747053
Message ID:
00750989
Vues:
23
Hi!

There are sources of sortable grid in the download. The demo EXE contains other code I would not like to reveal widely. Just read documentation file and use sortable grid class on some your form to make testing.

>OK Vlad,
>
> Can you send me source code your sortgridsample.exe?
> I want do any tests txtwidth()&txtfontmetric() vs. _screen.textwidth().
>
> MartinJ
>
>>Hi!
>>
>>Did you read help for TXTWidth() _accurately_? It is not TextWidth() methoid, it is TxtWidth() function, and with all 4 parameters paased it have no any relation to any VFP form. I found use of _Screen and TextWidth() very slow (made it the same way as you for the first time).
>>
>>As about Dtnamic*, it is correct note - my code does not account it. This is because it is just a code sample < g >.
>>
>>>Hi Vlado,
>>>
>>> Because (in help for TXWIDTH()): ...returned for the current font for the main Visual FoxPro window or the active output window. I'm want have sureness.
>>>
>>> And your code doesn't accept properties DynamicFontSize,DynamicFontName etc.
>>>
>>> MartinJ
>>>
>>>>Hi, Martin!
>>>>
>>>>Why you use "_Screen.TextWidth" when there is a TxtWidth() function? This makes code quite heavy.
>>>>
>>>>Also, take a look to file#9970 and article VFP Grids Part III that explains how it works. There is a header class with DblClick code to auto fit column. Also, that header class takes care that autofit is fired only when double click on resizing area of header (standard behavior in most applications), not anywhere on the header.
>>>>
>>>>HTH.
>>>>
>>>>>Hi Soykan,
>>>>>
>>>>>Insert code into method header.DblClick() every column..
>>>>>
>>>>>IF !This.Parent.Parent.SplitLineHitTest(This)
>>>>>   RETURN
>>>>>ENDIF
>>>>>....
>>>>>
>>>>>
>>>>>If you add property PropAsColumn into control (your classes texbox, combbox etc.) and set it to .T., then autofit respect dynamic properties on column.
>>>>>
>>>>> MartinJ
>>>>>
>>>>>>Hi All,
>>>>>>how can I autofit of grid columns
>>>>>>
>>>>>>TIA
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform