Hi friends,
I've tried to read about this new window type and it's use, but...
First of all I don't understand if I can use this new window type inside CHILD form.
After this, I've tried to use it but I receive an error during execution of my code.
I've included a sample prg and an error screenshot. I've defined/used form (with panel) one time as CHILD and one time as MODAL, but the error it's the same.
Many thanks in advantage
PANEL - new window type
Moderator: Rathinagiri
PANEL - new window type
- Attachments
-
- PanelTest.zip
- (34.29 KiB) Downloaded 338 times
Luigi from Italy
www.L3W.it
www.L3W.it
Re: PANEL - new window type
Hi,l3whmg wrote:Hi friends,
I've tried to read about this new window type and it's use, but...
First of all I don't understand if I can use this new window type inside CHILD form.
...
Many thanks in advantage
Please try the following working sample with CHILD form usage:
Code: Select all
#include "hmg.ch"
FUNCTION main()
p000_Define()
p001_Define()
ACTIVATE WINDOW p001win, p000win
RETURN NIL
/************************************************************
* Main form definition
************************************************************/
STATIC FUNCTION p000_Define()
DEFINE WINDOW p000win ;
AT 0,0 ;
WIDTH 860 ;
HEIGHT 645 ;
TITLE 'Panel tester' ;
WINDOWTYPE MAIN ;
FONTNAME "Arial" FONTSIZE 12
DEFINE MAIN MENU
DEFINE POPUP '&File'
MENUITEM 'e&Xit' ACTION p000win.Release
END POPUP
DEFINE POPUP '&Open Form'
MENUITEM '&Do' ACTION p000_OpenForm()
END POPUP
END MENU
END WINDOW
p000win.Center
RETURN NIL
/************************************************************
* Sub (and panel) form definition
************************************************************/
STATIC FUNCTION p001_Define()
DEFINE WINDOW p001win ;
AT 0,0 ;
WIDTH 700 ;
HEIGHT 525 ;
TITLE 'Sub Form' ;
WINDOWTYPE CHILD ;
NOAUTORELEASE ;
ONINIT p001win.Hide ;
FONTNAME "Arial" FONTSIZE 12
DEFINE TOOLBAR toolbar1 ;
BUTTONSIZE 60,30 ;
FONT "Arial" ;
SIZE 10 ;
FLAT ;
BORDER
BUTTON bt_exit ;
CAPTION 'e&Xit' ;
ACTION p001win.Hide ;
SEPARATOR
END TOOLBAR
DEFINE WINDOW Win_2 ;
ROW 80 ;
COL 30 ;
WIDTH 300 ;
HEIGHT 200 ;
VIRTUALWIDTH 400 ;
VIRTUALHEIGHT 400 ;
WINDOWTYPE PANEL
DEFINE LABEL lb_label1
ROW 10
COL 10
VALUE 'Panel window...'
WIDTH 300
END LABEL
END WINDOW
END WINDOW
p001win.Center
RETURN NIL
/************************************************************
* Sub (and panel) form open
************************************************************/
STATIC FUNCTION p000_OpenForm()
p001win.Show
p001win.Setfocus
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
Re: PANEL - new window type
Hi Grigory,
many thanks! Work fine...with little trick
Best regards
many thanks! Work fine...with little trick
Best regards
Luigi from Italy
www.L3W.it
www.L3W.it
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: PANEL - new window type
Using ACTIVATE WINDOW ALL command, NOAUTORELEASE style is assumed for all windows (excepting main).l3whmg wrote:Hi friends,
I've tried to read about this new window type and it's use, but...
First of all I don't understand if I can use this new window type inside CHILD form.
After this, I've tried to use it but I receive an error during execution of my code.
I've included a sample prg and an error screenshot. I've defined/used form (with panel) one time as CHILD and one time as MODAL, but the error it's the same.
Many thanks in advantage
Panel windows can't have the autorelease style, because their 'embedded' nature.
I'll reinforce error checking to warn the user about this.
Thanks for reporting.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: PANEL - new window type
I've already fixed. Avoiding that Panel windows be double activated by ACTIVATE WINDOW ALL command.Roberto Lopez wrote:Using ACTIVATE WINDOW ALL command, NOAUTORELEASE style is assumed for all windows (excepting main).l3whmg wrote:Hi friends,
I've tried to read about this new window type and it's use, but...
First of all I don't understand if I can use this new window type inside CHILD form.
After this, I've tried to use it but I receive an error during execution of my code.
I've included a sample prg and an error screenshot. I've defined/used form (with panel) one time as CHILD and one time as MODAL, but the error it's the same.
Many thanks in advantage
Panel windows can't have the autorelease style, because their 'embedded' nature.
I'll reinforce error checking to warn the user about this.
Thanks for reporting.
I've found a problem with 'restore' method used by you (instead of 'show'). It not worked for non-visible windows.
Thanks again for reporting.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: PANEL - new window type
Hi Roberto,
many, many thanks to you forf your great job HMG!
Best regards
many, many thanks to you forf your great job HMG!
Best regards
Luigi from Italy
www.L3W.it
www.L3W.it