In my application, I need Change the Columns' Width in a MsFlexgrid Control expcept the first fixed column ,but How Can I ? Thanks !
Printable View
In my application, I need Change the Columns' Width in a MsFlexgrid Control expcept the first fixed column ,but How Can I ? Thanks !
Add a module to your programm and add there this code:
public Sub SetColWidth()
Dim Counter as Integer
'MSFlexGrid1
for Counter = 1 to NumberOfColumns 'replace it with the actual number
frmName.MSFlexGrid1.ColWidth(Counter) = 808 'play with this number
frmName.MSFlexGrid1.FixedAlignment(Counter) = 3
next Counter
End Sub
Customize this routine at your suites (eg. change the name of the form)
Call this routine from your Form_Load event.
Michael Vlastos
Company MODUS SA
Development Department
Athens, Greece
Tel: +3-01-9414900
Dr_Michael:
Thank you !
If I want let end-user Change the Columns' Width except the first fixed column at run-time , How Can I ?
yours daling.
There's an article at http://www.codeguru.com/vb/articles/1721.shtml which detect's a resize event on a flexgrid column/row.
You could take this code and modify it so that any particular column doesn't get resized.
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb