Page 1 of 1

Form with in a Panel

Posted: Saturday 5th December 2020 1:19am
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?

Re: Form with in a Panel

Posted: Saturday 5th December 2020 8:22am
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.

Re: Form with in a Panel

Posted: Saturday 5th December 2020 1:07pm
by PJBlack
FORM.reparent(PANELNAME)

' or

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

... but as said above ... this is not MDI ...

Re: Form with in a Panel

Posted: Saturday 5th December 2020 2:20pm
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

Re: Form with in a Panel

Posted: Saturday 5th December 2020 3:49pm
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 4843 times

I hope this helps.

Re: Form with in a Panel

Posted: Saturday 5th December 2020 4:42pm
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 317 times

Re: Form with in a Panel

Posted: Sunday 6th December 2020 4:42am
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.