Following are my main function likes
#include <hmg.ch>
Function Main
Load Window Main as MainForm
mainform.Center
mainform.Activate
SetProperty("MainForm","MissList","Widths",{90,90})
Return
The widths of columns did not change.(origin is {30,30})
After MainForm activated.
How could I change property, which especifically definition only?
The reason I would like to do so is because that plentys of derivatives from one template.
Best Regards
chen min
After MainForm activated. How could I change property?
Moderator: Rathinagiri
-
huangchenmin
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: After MainForm activated. How could I change property?
Hello Chen Min
Widths is a "Available at control definition only" property (Indicated with (D) in the documentation) for both Browse and Grid.
So its no way to change it at run time.
We hope eagerly that such limitations will go away at the HMG.4
Happy HMG'ing
Regards
--
Esgici
Widths is a "Available at control definition only" property (Indicated with (D) in the documentation) for both Browse and Grid.
So its no way to change it at run time.
We hope eagerly that such limitations will go away at the HMG.4
Happy HMG'ing
Regards
--
Esgici
Viva INTERNATIONAL HMG 
-
huangchenmin
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
Re: After MainForm activated. How could I change property?
Thank you for supporting.esgici wrote:Hello Chen Min
Widths is a "Available at control definition only" property (Indicated with (D) in the documentation) for both Browse and Grid.
So its no way to change it at run time.
We hope eagerly that such limitations will go away at the HMG.4
Happy HMG'ing
Regards
--
Esgici
The futher HMG I used, The more amazing it bring to me.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
After MainForm activated. How could I change property?
Hi chen min,huangchenmin wrote: SetProperty("MainForm","MissList","Widths",{90,90})
...
The widths of columns did not change.(origin is {30,30})
After MainForm activated.
How could I change property, which especifically definition only?
Now this is posible since HMG 3.1.3
Please read this at our hmgdoc (New Set Properties:) you will see:
<ParentWindowName>.<GridControlName>.ColumnWIDTH( nColIndex ) := [ nColumnWidth ]
By the way, we have to correct hmgdoc. Now is not (D) any more for ColumnWIDTH
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
Javier Tovar
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: After MainForm activated. How could I change property?
Hello,
Also remember that once the activated form:
and you can not put:
It would be a procedure in ON INIT Form. or before activating the form.
What would be correct:
With the directions tell you the friend Pablo César.
regards
Also remember that once the activated form:
Code: Select all
mainform.Center
mainform.ActivateCode: Select all
SetProperty ("MainForm", "MissList", "Widths", {90,90})What would be correct:
Code: Select all
<ParentWindowName>.<GridControlName>.ColumnWIDTH( nColIndex ) := [ nColumnWidth ]
mainform.Center
mainform.Activateregards
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
After MainForm activated. How could I change property?
Yes Javier, before was not posible to change column widths of grids even trying before activating form.
It's for this reason, I came to clarify that now is posible and also we need to fix our hmgdoc.
Actually we have C:\hmg.3.4.0\SAMPLES\Controls\Grid\GRID_40\demo.prg to see this behaviour by clicking on a third header to change column size. In this example is using: GRID_WIDTH_AUTOSIZEHEADER for column #3 and GRID_WIDTH_AUTOSIZE for column #5. But it could be changed to put a fixed columnwdith size too.
So from now, we can use:
<ParentWindowName>.<GridControlName>.ColumnWIDTH( nColIndex ) := [ nColumnWidth ]
at any time !
Thanks to our good friend Dr. Claudio Soto.
It's for this reason, I came to clarify that now is posible and also we need to fix our hmgdoc.
Actually we have C:\hmg.3.4.0\SAMPLES\Controls\Grid\GRID_40\demo.prg to see this behaviour by clicking on a third header to change column size. In this example is using: GRID_WIDTH_AUTOSIZEHEADER for column #3 and GRID_WIDTH_AUTOSIZE for column #5. But it could be changed to put a fixed columnwdith size too.
So from now, we can use:
<ParentWindowName>.<GridControlName>.ColumnWIDTH( nColIndex ) := [ nColumnWidth ]
at any time !
Thanks to our good friend Dr. Claudio Soto.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
Javier Tovar
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: After MainForm activated. How could I change property?
+1 Pablo César!