USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  Visual Basic
Voltar
Autor Assunto:  Ajustar colunas no MSHFlexGrid
H e n n y
Pontos: 2843
SALVADOR
BA - BRASIL
Postada em 30/09/2005 20:49 hs         
Tem uma dica no site mas aki ñ funcionou!
 
alguém sabe como Ajustar colunas no MSHFlexGrid
     
ArtSoft
SAO PAULO
SP - BRASIL
Postada em 01/10/2005 22:48 hs         
'With Grid
'    .FormatString = "DATA | HORA | TIPO | DESCRIÇÃO | VALOR | MSG SE LIGADO | MSG SE DESLIGADO | USUÁRIO "
''
WITH MSHFlexGrid
    .ColWidth(0) = 1100                  'TAMANHO DA 1ª COLUNA
    .ColWidth(1) = 1100                  'TAMANHO DA 2ª COLUNA
    .ColWidth(2) = 1100                  'TAMANHO DA 3ª COLUNA
    .ColWidth(3) = 4100                  'TAMANHO DA 4ª COLUNA
END WITH
 

Alexandre Costa
ArtSoftSystems

Skype:artsoftsystems
MSN:alexandre.artsoft@hotmail.com
artsoftsystems@uol.com.br

     
Donkey
Pontos: 2843 Pontos: 2843 Pontos: 2843 Pontos: 2843
PRESIDENTE PRUDENTE
SP - BRASIL
Postada em 02/10/2005 11:27 hs            
Tente esse código:
 
    Dim Largura As Double, Linha As Integer
    Largura = 0: Linha = 0
    For Linha = 1 To grid1.Rows - 1
        If grid1.TextMatrix(Linha, 1) <> "" Then
            If TextWidth(grid1.TextMatrix(Linha, 1)) > Largura Then
                Largura = TextWidth(grid1.TextMatrix(Linha, 1))
            End If
        End If
    Next
    grid1.ColWidth(1) = Largura + 200
 
No caso estou adequando a largura da coluna 1.... Qualquer duvida da um grito.
T+
     
Página(s): 1/1    

CyberWEB Network Ltda.    © Copyright 2000-2025   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página