change column width inside grid

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
franco
Posts: 213
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 6 times

change column width inside grid

Post by franco » Thu Nov 16, 2017 7:09 pm

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 ;)

KDJ
Posts: 182
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland
Been thanked: 200 times

Post by KDJ » Thu Nov 16, 2017 8:07 pm

franco

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

franco
Posts: 213
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 6 times

Post by franco » Thu Nov 16, 2017 9:46 pm

Thanks for quick responce KDJ.
That was easy, I`ll give a try.
Franco ;)

Post Reply