Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Como ajustar as colunas de um GRID ?
Message
De
14/08/2002 03:52:58
 
 
À
13/08/2002 18:58:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00689370
Message ID:
00689447
Vues:
21
> Alguem sabe como fazer o GRID ajustar o tamanho das colunas de acordo com o tamanho dos campos independentemente fonte e seu tamanho ?

Esta query talvez possa ser-lhe útil:
WITH THISFORM.Grid1.Column1
  m.lcFontName = .FontName
  m.lnFontSize = .FontSize
  m.lcFontStyle = IIF(.FontBold,"B","") + IIF(.FontItalic,"I","")
  IF EMPTY(m.lcFontStyle)
    m.lcFontStyle = "N"
  ENDIF
  m.lnAverageWidth = FONTMETRIC(6,m.lcFontName,m.lnFontSize,m.lcFontStyle)
ENDWITH

SELECT MAX(TXTWIDTH(ALLTRIM(Tabela.Campo),m.lcFontName,m.lnFontSize,m.lcFontStyle)*m.lnAverageWidth) ;
FROM Tabela
É devolvida a dimensão máxima, em pixels, do campo.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform