change column width inside grid

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

change column width inside grid

Post 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 ;)
All The Best,
Franco
Canada
KDJ
Posts: 243
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: change column width inside grid

Post by KDJ »

franco

You can use ColumnWIDTH property:
FormName.GridName.ColumnWIDTH(nColumn) := 30
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: change column width inside grid

Post by franco »

Thanks for quick responce KDJ.
That was easy, I`ll give a try.
Franco ;)
All The Best,
Franco
Canada
Post Reply