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?
Form with in a Panel
Re: Form with in a Panel
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
FORM.reparent(PANELNAME)
' or
FORM.reparent(PANELNAME, X-POS, Y-POS)
... but as said above ... this is not MDI ...-
- Posts: 363
- Joined: Wednesday 2nd December 2020 12:11am
- Location: Northampton, England
- Contact:
Re: Form with in a Panel
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 appreciatedstevedee wrote: ↑Saturday 5th December 2020 8:22amI 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
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.AndyGable wrote: ↑Saturday 5th December 2020 2:20pmI have been reading that all night and I still can not get it to work...stevedee wrote: ↑Saturday 5th December 2020 8:22amI 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.
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.
I hope this helps.
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Form with in a Panel
Here is a little program that may help you. Let us know how you get on.
-
- Posts: 363
- Joined: Wednesday 2nd December 2020 12:11am
- Location: Northampton, England
- Contact:
Re: Form with in a Panel
Many thanks for the samples
this is what I am trying to do
I have my background form (frmbackground)
and then I have my First form that i display when the app starts up
So when the application is running the user would see
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.
this is what I am trying to do
I have my background form (frmbackground)
and then I have my First form that i display when the app starts up
So when the application is running the user would see
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.