Gambas Equivalent of MDI
Posted
#1
(In Topic #1501)
Regular

BTW… a few sites say create a workspace - but instructions aren't working from this site:
/comp/gb.form.mdi/workspace/_new - Gambas Documentation
In the parent form, I put in public sub form_open()
dim dwork as workspace (I also tried dim work as new workspace)
and get the error "unknown identifier: workspace (disparent.class:7)
Posted
Guru

Posted
Administrator

Make this form your main form. And add a menu to open recipes (mnuOpen)
I guess you already have a form that shows the recipes now and does all the magic. That is the form you want multiple instances of and don't want to be your main form.
Make sure it has a:
Let's call your recipe form FrmRecipe and the workspace on main form Workspace1. On the event of opening a recipe (from your main form mnuOpen) you could do this:
So, now all you need to do is code the FrmRecipe once for all recipes and reuse by opening an instance for each recipe. Add arguments to _new() of FrmRecipe, so you can pass what you need to the instance just created.
I hope this will get you started. Feel free to ask questions.
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
Posted
Regular

How do I create a workspace to begin with? I think I may need to add some components, but it isn't recognizing gb.form.mdi.
Posted
Administrator

In project properties, tab components select gb.form.mditailkinker said
How do I create a workspace to begin with? I think I may need to add some components, but it isn't recognizing gb.form.mdi.
Workspace icon
Project properties -> Components
Enjoy…
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
Posted
Regular

Posted
Administrator

tailkinker said
I do believe their will be magic in my nutrition program today!
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
1 guest and 0 members have just viewed this.



