On Thu, 26 Mar 2015, Roel Touwen wrote:
> Hi everyone,
> 
> Has anybody a sample source of a component which holds a form? I'm 
> trying for two weeks now and I simply don't succeed.
> 
> What I want to do is have form that I can embed in another form (within 
> a tab). I could use a workspace but people can delete the tab then.
> 

It's not clear to me what you want to do. You must know that the term
"component" around Gambas usually means a shared library which adds
functionality to the interpreter. gb.qt4, for example, is the QT4
component.

I'll assume that you want to create just a "widget" class which is usually
called a "control", instead of component. [ A component is a whole
collection of classes, and sometimes also controls, for a specific task. ]

But you don't need to create a new control class either. Embedding forms
is super easy. Again, assuming that I understood you, I attach a project
which shows how to embed some instance of a Form class into a TabPanel
where you can control, contrary to Workspace, if the user is able to close
a tab.

Note: On my system, the first form which is embedded into a tab of the
TabPanel is not resized, while all subsequent forms are expanded to fill
their tab. I don't know why...

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

Attachment: tabpanel-embed-form-0.0.1.tar.gz
Description: Binary data

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to