HMG 2.6.6
Moderator: Rathinagiri
- Roberto Lopez
- HMG Founder
- Posts: 4012
- Joined: Wed Jul 30, 2008 6:43 pm
HMG 2.6.6
English:
- Fixed: Error in documentation. Reported by Grigory Filatov.
- Fixed: Another problem in print preview introduced in 2.6.2.
Reported by Grigory Filatov.
- Fixed: Semi-oop syntax for containers. Tab, ToolBar and SplitBox
child controls can be (optionally) referred as follows:
ToolBar Buttons:
Window.ToolBar.Button
Tab child controls:
Window.Tab(nPage).Control
SplitBox child controls ('SplitBox' name is automatically assigned):
Window.SplitBox.Control
When a ToolBar is in a SplitBox, the syntax is as follows:
Window.SplitBox.ToolBar.Button
Samples: \hmg\samples\containers.
Español:
- Solucionado: Error en la documentación. Reportado por Grigory Filatov.
- Solucionado: Otro problema en la vista previa de impresión introducido
en la versión 2.6.2. Reportado por Grigory Filatov.
- Solucionado: Sintaxis semi-oop para contenedores. Los controles
pertenecientes a un Tab, SplitBox o ToolBar pueden ser referidos
(opcionalmente) según se indica a continuación:
Botones de ToolBar:
Window.ToolBar.Button
Controles en Tab:
Window.Tab(nPage).Control
Controles en SplitBox (El nombre 'SplitBox' es asignado
automáticamente):
Window.SplitBox.Control
Cuando un ToolBar está en un SplitBox, la sintaxis es:
Window.SplitBox.ToolBar.Button
Ejemplos: \hmg\samples\containers.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Rathinagiri
- Posts: 5477
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG 2.6.6
Nice enhancement. Thank you Roberto.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: HMG 2.6.6
I have reached an Error in situation like this:
I have defined window:
Define Window OknoUstawienia
and later, if I want to read "row" value:
xpos := OknoUstawienia.row
I get error:
Error BASE/1003 Zmienna nie istnieje: _OKNOUSTAWIENIA_ROW
^^^^^^^variable does not exist.... ^^^^^^^^^^^^^
Called from GETCONTROLTYPE(871)
Called from GETPROPERTY(6864)
It worked up to ver. hmg 2.6.4
I tried GetProperty:
GetProperty("OknoUstawienia","ROW")
and it works properly...
What's going on?
Best regards, Marek "MOL", Poland
I have defined window:
Define Window OknoUstawienia
and later, if I want to read "row" value:
xpos := OknoUstawienia.row
I get error:
Error BASE/1003 Zmienna nie istnieje: _OKNOUSTAWIENIA_ROW
^^^^^^^variable does not exist.... ^^^^^^^^^^^^^
Called from GETCONTROLTYPE(871)
Called from GETPROPERTY(6864)
It worked up to ver. hmg 2.6.4
I tried GetProperty:
GetProperty("OknoUstawienia","ROW")
and it works properly...
What's going on?
Best regards, Marek "MOL", Poland
Re: HMG 2.6.6
Hi Marek,mol wrote:I have reached an Error in situation like this:
I have defined window:
Define Window OknoUstawienia
and later, if I want to read "row" value:
xpos := OknoUstawienia.row
I get error:
Error BASE/1003 Zmienna nie istnieje: _OKNOUSTAWIENIA_ROW
^^^^^^^variable does not exist.... ^^^^^^^^^^^^^
Called from GETCONTROLTYPE(871)
Called from GETPROPERTY(6864)
It worked up to ver. hmg 2.6.4
I tried GetProperty:
GetProperty("OknoUstawienia","ROW")
and it works properly...
What's going on?
There are a semi-oop changes introduced since hmg 2.6.5.
Tip: to add a brackets for your semi-oop declaration OknoUstawienia.row,
f.e. ( OknoUstawienia.row )
But I don't confirm a such problem for the following sample:
Code: Select all
/*
* MiniGUI This Demo
* (c) 2003 Roberto Lopez
*/
#include "minigui.ch"
Function Main
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 200 ;
TITLE 'This Demo' ;
MAIN ;
ON INIT This.Title := 'New Title (From This)'
@ 10,10 BUTTON Button_1 ;
CAPTION 'Hi!!!' ;
ACTION ThisTest() ;
TOOLTIP 'Test Tip'
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return
Procedure ThisTest()
ThisWindow.Row := 10
ThisWindow.Col := 10
MsgInfo ( str(Form_1.Row)+str(Form_1.Col) , This.Name ) // this line without error
MsgInfo ( This.Caption )
This.Hide
MsgInfo (This.Name)
MsgInfo ( This.ToolTip )
This.Show
Return
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- luisvasquezcl
- Posts: 1259
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: HMG 2.6.6
Hi,
Is this problem will be solved or we will have to modify all the programs?
Regards,
Luis Vásquez.
Is this problem will be solved or we will have to modify all the programs?
Regards,
Luis Vásquez.
- Roberto Lopez
- HMG Founder
- Posts: 4012
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 2.6.6
Mol, Grigory, Luis:mol wrote:I have reached an Error in situation like this:
I have defined window:
Define Window OknoUstawienia
and later, if I want to read "row" value:
xpos := OknoUstawienia.row
I get error:
Error BASE/1003 Zmienna nie istnieje: _OKNOUSTAWIENIA_ROW
^^^^^^^variable does not exist.... ^^^^^^^^^^^^^
Called from GETCONTROLTYPE(871)
Called from GETPROPERTY(6864)
It worked up to ver. hmg 2.6.4
I tried GetProperty:
GetProperty("OknoUstawienia","ROW")
and it works properly...
What's going on?
Best regards, Marek "MOL", Poland
The changes made in 2.6.5 should be backwards compatible, if not, it is an error and I'll try to fix it.
Please send a complete sample showing the problem, since, the row property for windows is working for me, so, I can't confirm (or try to fix) a bug.
Thanks.
Regards,
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: HMG 2.6.6
Roberto,Roberto Lopez wrote: Mol, Grigory, Luis:
The changes made in 2.6.5 should be backwards compatible, if not, it is an error and I'll try to fix it.
Please send a complete sample showing the problem, since, the row property for windows is working for me, so, I can't confirm (or try to fix) a bug.
Thanks.
Try the following sample at the folder samples\containers\toolbar:
Code: Select all
/*
* MINIGUI - Harbour Win32 GUI library Demo
*
* Copyright 2002 Roberto Lopez <harbourminigui@gmail.com>
* http://harbourminigui.googlepages.com/
*/
#include "minigui.ch"
Function Main
DEFINE WINDOW Form_0 ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
TITLE 'MiniGUI ToolBar Demo' ;
ICON 'DEMO.ICO' ;
MAIN ;
FONT 'Arial' SIZE 10
ON KEY F2 ACTION MsgInfo('F2 (Main)')
DEFINE STATUSBAR
STATUSITEM 'HMG Power Ready!'
END STATUSBAR
DEFINE MAIN MENU
POPUP '&File'
ITEM '&Disable ToolBar Button' ACTION Form_0.Toolbar_1.Button_1.Enabled := .F.
ITEM '&Enable ToolBar Button' ACTION Form_0.Toolbar_1.Button_1.Enabled := .T.
SEPARATOR
ITEM 'Get ToolBar Button Caption' ACTION MsgInfo( Form_0.Toolbar_1.Button_1.Caption)
SEPARATOR
ITEM 'Set ToolBar Button Caption' ACTION SetProperty ( 'Form_0' , 'ToolBar_1' , 'Button_1' , 'Caption' , 'New New' )
SEPARATOR
ITEM '&Exit' ACTION Form_0.Release
END POPUP
POPUP '&Help'
ITEM '&About' ACTION MsgInfo ("MiniGUI ToolBar demo")
END POPUP
END MENU
DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 85,85 FLAT BORDER
BUTTON Button_1 ;
CAPTION '&More ToolBars...' ;
PICTURE 'button1.bmp' ;
ACTION Modal_Click() TOOLTIP 'ONE'
BUTTON Button_2 ;
CAPTION '&Button 2' ;
PICTURE 'button2.bmp' ;
ACTION MsgInfo('Click! 2') TOOLTIP 'TWO'
BUTTON Button_3 ;
CAPTION 'Button &3' ;
PICTURE 'button3.bmp' ;
ACTION MsgInfo('Click! 3') TOOLTIP 'THREE'
END TOOLBAR
END WINDOW
Form_0.Toolbar_1.Col := Form_0.Width - Form_0.Toolbar_1.Width - 15 // this problem string
CENTER WINDOW Form_0
ACTIVATE WINDOW Form_0
Return Nil
*-----------------------------------------------------------------------------*
Procedure Modal_CLick
*-----------------------------------------------------------------------------*
DEFINE WINDOW Form_2 ;
AT 0,0 ;
WIDTH 400 HEIGHT 300 ;
TITLE 'ToolBar Test' ;
MODAL NOSIZE
ON KEY F2 ACTION MsgInfo('F2 (Child)')
ON KEY F10 ACTION MsgInfo('F10 (Child)')
DEFINE TOOLBAR ToolBar_1 FLAT BUTTONSIZE 100,30 BOTTOM RIGHTTEXT
BUTTON Button_1 ;
CAPTION '&Undo' ;
PICTURE 'button4.bmp' ;
ACTION MsgInfo('UnDo Click!')
BUTTON Button_2 ;
CAPTION '&Save' ;
PICTURE 'button5.bmp' ;
ACTION MsgInfo('Save Click!')
BUTTON Button_3 ;
CAPTION '&Close' ;
PICTURE 'button6.bmp' ;
ACTION Form_2.Release
END TOOLBAR
END WINDOW
Form_2.Center
Form_2.Activate
Return Nil
But the following sample works properly (after adding parentheses):Harbour MiniGui Errorlog File
------------------------------------
Date:10/01/08 Time: 21:22:45
Error BASE/1003 Variable does not exist: _FORM_0_WIDTH
Called from GETCONTROLTYPE(871)
Called from GETPROPERTY(6864)
Called from MAIN(63)
Code: Select all
/*
* MINIGUI - Harbour Win32 GUI library Demo
*
* Copyright 2002 Roberto Lopez <harbourminigui@gmail.com>
* http://harbourminigui.googlepages.com/
*/
#include "minigui.ch"
Function Main
DEFINE WINDOW Form_0 ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
TITLE 'MiniGUI ToolBar Demo' ;
ICON 'DEMO.ICO' ;
MAIN ;
FONT 'Arial' SIZE 10
ON KEY F2 ACTION MsgInfo('F2 (Main)')
DEFINE STATUSBAR
STATUSITEM 'HMG Power Ready!'
END STATUSBAR
DEFINE MAIN MENU
POPUP '&File'
ITEM '&Disable ToolBar Button' ACTION Form_0.Toolbar_1.Button_1.Enabled := .F.
ITEM '&Enable ToolBar Button' ACTION Form_0.Toolbar_1.Button_1.Enabled := .T.
SEPARATOR
ITEM 'Get ToolBar Button Caption' ACTION MsgInfo( Form_0.Toolbar_1.Button_1.Caption)
SEPARATOR
ITEM 'Set ToolBar Button Caption' ACTION SetProperty ( 'Form_0' , 'ToolBar_1' , 'Button_1' , 'Caption' , 'New New' )
SEPARATOR
ITEM '&Exit' ACTION Form_0.Release
END POPUP
POPUP '&Help'
ITEM '&About' ACTION MsgInfo ("MiniGUI ToolBar demo")
END POPUP
END MENU
DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 85,85 FLAT BORDER
BUTTON Button_1 ;
CAPTION '&More ToolBars...' ;
PICTURE 'button1.bmp' ;
ACTION Modal_Click() TOOLTIP 'ONE'
BUTTON Button_2 ;
CAPTION '&Button 2' ;
PICTURE 'button2.bmp' ;
ACTION MsgInfo('Click! 2') TOOLTIP 'TWO'
BUTTON Button_3 ;
CAPTION 'Button &3' ;
PICTURE 'button3.bmp' ;
ACTION MsgInfo('Click! 3') TOOLTIP 'THREE'
END TOOLBAR
END WINDOW
Form_0.Toolbar_1.Col := Form_0.Width - ( Form_0.Toolbar_1.Width ) - 15
CENTER WINDOW Form_0
ACTIVATE WINDOW Form_0
Return Nil
*-----------------------------------------------------------------------------*
Procedure Modal_CLick
*-----------------------------------------------------------------------------*
DEFINE WINDOW Form_2 ;
AT 0,0 ;
WIDTH 400 HEIGHT 300 ;
TITLE 'ToolBar Test' ;
MODAL NOSIZE
ON KEY F2 ACTION MsgInfo('F2 (Child)')
ON KEY F10 ACTION MsgInfo('F10 (Child)')
DEFINE TOOLBAR ToolBar_1 FLAT BUTTONSIZE 100,30 BOTTOM RIGHTTEXT
BUTTON Button_1 ;
CAPTION '&Undo' ;
PICTURE 'button4.bmp' ;
ACTION MsgInfo('UnDo Click!')
BUTTON Button_2 ;
CAPTION '&Save' ;
PICTURE 'button5.bmp' ;
ACTION MsgInfo('Save Click!')
BUTTON Button_3 ;
CAPTION '&Close' ;
PICTURE 'button6.bmp' ;
ACTION Form_2.Release
END TOOLBAR
END WINDOW
Form_2.Center
Form_2.Activate
Return Nil
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- Roberto Lopez
- HMG Founder
- Posts: 4012
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 2.6.6
Grigory:gfilatov wrote:
Try the following sample at the folder samples\containers\toolbar:Code: Select all
Form_0.Toolbar_1.Col := Form_0.Width - Form_0.Toolbar_1.Width - 15 // this problem string Return Nil
The expression: "Form_0.Toolbar_1.Col" has no sense, since ToolBar control has not a 'Col' property.
Regards,
Roberto.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4012
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 2.6.6
If in the same program, at the same place you put the following code:Roberto Lopez wrote:Grigory:gfilatov wrote:
Try the following sample at the folder samples\containers\toolbar:Code: Select all
Form_0.Toolbar_1.Col := Form_0.Width - Form_0.Toolbar_1.Width - 15 // this problem string Return Nil
The expression: "Form_0.Toolbar_1.Col" has no sense, since ToolBar control has not a 'Col' property.
Regards,
Roberto.
Code: Select all
nTest := Form_0.Row
MsgInfo ( Str(nTest) )
This is because I've requested to MOL a complete sample showing the problem and (if it exists) fix it.
Regards,
Roberto.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4012
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 2.6.6
Finally:Roberto Lopez wrote: If in the same program, at the same place you put the following code:It is working, retrieving correctly the row property value.Code: Select all
nTest := Form_0.Row MsgInfo ( Str(nTest) )
This is because I've requested to MOL a complete sample showing the problem and (if it exists) fix it.
Regards,
Roberto.
Again, in the same sample, at the same place, if you paste the following:
Code: Select all
Form_0.row := form_0.row - 50
You could test with 2.0.032 and obtain the same syntax error, that you can avoid using parenthesis.
Regards,
Roberto.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)