August 2nd, 1999, 05:03 AM
In my application, I need Change the Columns' Width in a MsFlexgrid Control expcept the first fixed column ,but How Can I ? Thanks !
|
Click to See Complete Forum and Search --> : MsFlexGrid August 2nd, 1999, 05:03 AM In my application, I need Change the Columns' Width in a MsFlexgrid Control expcept the first fixed column ,but How Can I ? Thanks ! Dr_Michael August 2nd, 1999, 05:17 AM 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 August 2nd, 1999, 09:04 PM 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. Chris Eastwood August 3rd, 1999, 07:09 AM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |