Main window with child windows

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
ohaldi
Posts: 21
Joined: Mon Mar 23, 2009 12:00 pm

Main window with child windows

Post by ohaldi »

Hello,

I'm looking for a good sample for HGMIDE about a main window with many child windows.
I find some of them in c:\Hmg\SAMPLES\SPLITBOX_2\, but the child window can move outside from the main window.
Could somebody tell me if they are any do download ?

Many thanks in advance for any help.
Otto
Regards
Otto

User avatar
esgici
Posts: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

Post by esgici »

Hello Otto, welcome
ohaldi wrote:Hello,
...
... the child window can move outside from the main window.
...
This is a normal behavior.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER »

Hi Otto

HMG does not support MDI in the traditional sense.
What is you wanted is clearly child windows within a Main Window i.e MDI programming.
If this is what you want, you will have to use HMG Extended. No worries all your HMG codes can still be used :-)

But be forewarned that HMG Extended codes may not compile in HMG-IDE.

Regards

CCH
http://cch4clipper.blogspot.com

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Post by sudip »

Hi Otto,

You may use SPLITCHILD window also with hmg.

But, as a learner, I couldn't find any example for this.

Can any one send me an example of SPLITCHILD windows? :)

Regards.

Sudip
With best regards,
Sudip

User avatar
esgici
Posts: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

Post by esgici »

Hi Sudip

sudip wrote: But, as a learner, I couldn't find any example for this.
Can any one send me an example of SPLITCHILD windows? :)

Please look at DEFINE WINDOW SplitChild_1 ( line 94) in C:\hmg\SAMPLES\CONTAINERS\SPLITBOX\demo4.prg.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Post by sudip »

Thank you Esgici,

I compiled the demo previously but didn't go through it precisely (as I thought it's only splitbox demo!!!). There are many hidden treasures within HMG examples. :)

Now, I have a query, can we define a SPLITCHILD window on the fly. For example, by clicking a menuitem one window will be opened within main window ... etc. etc.

With best regards.

Sudip
With best regards,
Sudip

User avatar
Rathinagiri
Posts: 5324
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 200 times
Been thanked: 210 times
Contact:

Post by Rathinagiri »

Yes. I think it can be.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Post by sudip »

Hi Rathi,

Any special syntax required or standard splitchild definition will work? (Actually I am facing problem regarding this)

It gives error in following code snippet:

Code: Select all

   DEFINE WINDOW frmCust            ;
      AT 0,0               ;
      WIDTH 635            ;
      HEIGHT 460            ;
      TITLE 'Customer Setup'   ;
      SPLLITCHILD  ;
      FONT 'ARIAL' SIZE 9         ;
      ON INIT   ( OpenTables() , DeactivateEdit() ) ;
      ON RELEASE CloseTables()
Regards

Sudip
With best regards,
Sudip

User avatar
Rathinagiri
Posts: 5324
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 200 times
Been thanked: 210 times
Contact:

Post by Rathinagiri »

I think you have to specify the parent window by using the word "of" for the splitbox control.

See the sample for splitbox. You have to every time release the splitbox and re-define it.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Post by sudip »

Hello Rathinagiri,

Thanks a lot.

Sample code is like this

Code: Select all

DEFINE WINDOW SplitChild_1 ; 
	WIDTH 200 ;
	HEIGHT 200 ;
	VIRTUAL WIDTH 400 ;
	VIRTUAL HEIGHT 400 ;
	SPLITCHILD NOCAPTION 
But, here splitchild window is defined within a parent window, not defined on the fly (say, from menu) which I want.

Regards.

Sudip
With best regards,
Sudip

Post Reply