Re: HMG 3.4.1
Posted: Thu Aug 06, 2015 10:55 pm
Thanks Doc,
you're the greatest.
That should solve the probs.
Greetings from Germany
klauskugel
you're the greatest.
That should solve the probs.
Greetings from Germany
klauskugel
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
https://www.hmgforum.com/
Code: Select all
#include "hmg.ch"
function main()
local aHeaders:={'Column1','Column2','Column3'}
public aList:={}
SET MULTIPLE OFF WARNING
SET DATE ITALIAN
DEFINE WINDOW MainForm;
AT 90,90;
WIDTH 1025;
HEIGHT 550;
TITLE 'Resize Error';
MAIN;
ON SIZE Resize();
ON MAXIMIZE Resize()
DEFINE MAIN Menu of MainForm
DEFINE POPUP "File"
MENUITEM "About" ACTION MsgInfo("Action")
END POPUP
END MENU
@ 005,005 GRID Grid_1 ;
WIDTH 1000 HEIGHT 490 ;
HEADERS aHeaders;
WIDTHS {300,300,300} ;
ITEMS aList ;
VALUE 1;
FONT "Courier New" SIZE 10 ;
FONTCOLOR {000,000,255};
EDIT;
CELLNAVIGATION;
LOCKCOLUMNS 1
END WINDOW
MainForm.Center
MainForm.Activate
return NIL
//-----------------------
function Resize()
MainForm.Grid_1.Width:=MainForm.Width-25
MainForm.Grid_1.Height:=MainForm.Height-60
return NIL
//-----------------------
Hi ErikClip2Mania wrote:...
When I compile this code in 3.4.1 (+ patch 3), I get a runtime-error that the "form is not defined"?
When I change the order of the Controls, i.e. I put the grid as first Control, followed by the menu, I get no error.
When I add a status-bar control, I have to put it below the grid also, otherwise: error again.
This has changed in comparison with 3.4.0. ??? Is there an order in which you have to place the controls ?![]()
Code: Select all
function main()
local aHeaders:={'Column1','Column2','Column3'}
public aList:={}
lFirstRun := .T. // <--- added
...
function Resize()
IF lFirstRun
lFirstRun := .F.
ELSE
MainForm.Grid_1.Width:=MainForm.Width-25
MainForm.Grid_1.Height:=MainForm.Height-60
ENDIF
return NIL
This is really a big ( a bit academicClip2Mania wrote:... how come if I place the controls in another order it works (in 3.4.0, all combinations work)... ?
Apparently yes; and reason this effect too is also obscure for meSo the order of the controls does matter.
Did you tried with pre-3.4.0 verisons ?More specifically, all my programs have a resize function, which also resizes the grid - so I have to change everything now...
Maybe Dr. Soto can help - if he reads this?This is really a big ( a bit academic) question for me; definitely I don't know the answer
I only started working with version 3.4.0 last year, so I have no experience with older versions of HMG - and I really want to use 3.4.1 for the bug-fixes and new functions...Did you tried with pre-3.4.0 verisons ?