Page 1 of 1

change column width inside grid

Posted: Thu Nov 16, 2017 7:09 pm
by franco
Hi all, I am designing an appointment program. Again I have got to a grid and would like to know if there is a way to change the column width
when editing or viewing whats in the column. I am using a table and there is not enough room on the screen for all the columns.
My field length is (say 30) but my original col width is 1 (say 15). when I want to view or edit a column can I use somthing like:
on enter this.columnwidth := 30. then
on change savecell() function which then changes column width back to 15.
I know I can stretch the column width manually but is to time consuming and old fashioned.
I can also have an outside the grid textbox to show the 30 characters, but this is hard to keep changing where you are looking.
Any thoughts. Thanx in advance .... Franco ;)

Re: change column width inside grid

Posted: Thu Nov 16, 2017 8:07 pm
by KDJ
franco

You can use ColumnWIDTH property:
FormName.GridName.ColumnWIDTH(nColumn) := 30

Re: change column width inside grid

Posted: Thu Nov 16, 2017 9:46 pm
by franco
Thanks for quick responce KDJ.
That was easy, I`ll give a try.
Franco ;)