Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSFlexGrid1 change column width 1

Status
Not open for further replies.

PeterWallace

Programmer
Apr 28, 2003
210
AU

when I display a MSFlexGrid ..... I can set it up so that user can alter the width of the columns ....

however I can find no way to trigger something IF a user does this

I have some labels that display totals .... using colwidth(colNo) I can position the labels under the colums ...
However ... if user changes the width of a column I can only change the label position by continually checking on Colwidth ....

Does any body know what to use to trigger the change of label position

With Thanks

Peter Wallace
 
Only thing I can think of right now is to store the column widths in an array then trap the mouseup event. You can then compare current column widths to those stored.

Patrick
 
I assume you are aware of the MSFlexGrid.AllowUserResizing Property, if not consider;

AllowUserResizing = 0

Which would mean you would have to optimize col widths when the FlexGrid is first displayed or;

adjust the ToolTipProperty for the grid when the mouse is over a cell in the grid so that it displays the cell's full contents.
 
You might be able to display the totals in another flex grid. Just manipulate the properties to make it look like the labels and then you may be able to just match the column widths.

zemp
 
HughLerwill
AllowUserResizing = 0

It would be nice ... and I considered it very seriously ....alas .. users insist they need to change column size ( *very bad word*)

Redsmooth ... thanks ....
but that is what i am doing now

and looks like only way ....

Thanks
 
Maybe you could do away with the labels and pop their content into an extra bottom ('Totals') row of the grid.
 
have star for that Idea

I did muse that ..... and after a little play seems best Idea

Peter
 
Hugh

Bad word !!!

a Total Row added to Grid .... works fine

EXCEPT when there entries enough to need scrolling

THEN Users Can't see the Running Totals

Bugger it ... I have set up Labels on a floating Frame

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top