Form with in a Panel

Post your Gambas programming questions here.
Post Reply
AndyGable
Posts: 359
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

Form with in a Panel

Post by AndyGable »

Hi

Is it possible to display a form with in a Panel?

I am trying to replicate a MDI application and so far I have not worked out how to do this so I was thinking could I use a Panel to show the form in?
User avatar
stevedee
Posts: 518
Joined: Monday 20th March 2017 6:06pm

Re: Form with in a Panel

Post by stevedee »

AndyGable wrote: Saturday 5th December 2020 1:19am ...I am trying to replicate a MDI application and so far I have not worked out how to do this...
I haven't done it either (I'm sure others on this forum have...) but I think you need to look at the gb.form.mdi component: http://gambaswiki.org/wiki/comp/gb.form.mdi

Come back if you are still struggling Andy and one of us will knock up some example code.
User avatar
PJBlack
Posts: 184
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Form with in a Panel

Post by PJBlack »

FORM.reparent(PANELNAME)

' or

FORM.reparent(PANELNAME, X-POS, Y-POS)

... but as said above ... this is not MDI ...
AndyGable
Posts: 359
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

Re: Form with in a Panel

Post by AndyGable »

stevedee wrote: Saturday 5th December 2020 8:22am
AndyGable wrote: Saturday 5th December 2020 1:19am ...I am trying to replicate a MDI application and so far I have not worked out how to do this...
I haven't done it either (I'm sure others on this forum have...) but I think you need to look at the gb.form.mdi component: http://gambaswiki.org/wiki/comp/gb.form.mdi

Come back if you are still struggling Andy and one of us will knock up some example code.
I have been reading that all night and I still can not get it to work (am very new to Gambas) if someone would be kind enough to show me a example code I would be most appreciated
User avatar
stevedee
Posts: 518
Joined: Monday 20th March 2017 6:06pm

Re: Form with in a Panel

Post by stevedee »

AndyGable wrote: Saturday 5th December 2020 2:20pm
stevedee wrote: Saturday 5th December 2020 8:22am
AndyGable wrote: Saturday 5th December 2020 1:19am ...I am trying to replicate a MDI application and so far I have not worked out how to do this...
I haven't done it either (I'm sure others on this forum have...) but I think you need to look at the gb.form.mdi component: http://gambaswiki.org/wiki/comp/gb.form.mdi

Come back if you are still struggling Andy and one of us will knock up some example code.
I have been reading that all night and I still can not get it to work...
Not sure if I understand what you want to do, but to use the gb.form.mdi, add this component to a new project and then add a Workspace from the Special component category to the main form.

Now add 2 more forms with some visual components (e.g. labels, buttons) and add the 2 forms to the main form using the two lines of code in the image.
MCI_ex.png
MCI_ex.png (63.98 KiB) Viewed 4803 times

I hope this helps.
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Form with in a Panel

Post by cogier »

Here is a little program that may help you. Let us know how you get on.

Image
TestApp-0.0.3.tar.gz
(817.27 KiB) Downloaded 310 times
AndyGable
Posts: 359
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

Re: Form with in a Panel

Post by AndyGable »

Many thanks for the samples

this is what I am trying to do

I have my background form (frmbackground)

Image

and then I have my First form that i display when the app starts up

Image

So when the application is running the user would see

Image
When the user Presses the Sign on key (for example A the system will then display with in the Background from the sign on screen) This is because the Form FrmSignedOff (as this has the code for the keyPress) has focus and not the FrmBackground

The icons on the side of the app changes depending on what the program is doing (that is why they are placed on the background form and not each individual form as some forms are powered via multiple menu select example User Menu -> Till Menu -> No Sale etc

This works perfectly in windows (as this screen examples are from my VB.net application) so I need to work out how to replicate this in Linux.
Post Reply