0.7->0.8 issue: when not everything is a container

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

0.7->0.8 issue: when not everything is a container

oetiker
Experts,

In 0.7 most widgets were also containers. So I could for example
add a checkbox to the tab of a tabview widget to enable/disable the
tab.

   [tab1 x][tab2 x][tab3 x]______________________
   |                                             |
   |                                             |
   +----------------------------------------------

In 0.8 I tried todo the same, but since the button widget is no
container, it seem that the easy way is blocked. Any idea how I
could get a another widget inside the tab-buttons of a tabview


cheers
tobi

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: 0.7->0.8 issue: when not everything is a container

Fabian Jakobs
Administrator
Hi Tobias,

> Experts,
>
> In 0.7 most widgets were also containers. So I could for example
> add a checkbox to the tab of a tabview widget to enable/disable the
> tab.
>
>    [tab1 x][tab2 x][tab3 x]______________________
>    |                                             |
>    |                                             |
>    +----------------------------------------------
>
> In 0.8 I tried todo the same, but since the button widget is no
> container, it seem that the easy way is blocked. Any idea how I
> could get a another widget inside the tab-buttons of a tabview
>  
The 0.7 method does not work but you can do it in 0.8 as well. One
difference in the 0.8 tab view is that the tab pane and the tab button
are combined in one widget: the tab page. You can subclass this widget
and create your custom widget instead of a button. This is how you can
do it:

1. Create your own button class:
  - subclass qx.ui.form.RadioButton
  - in the button's constructor you can add the checkbox using "_add"

2. Create a subclass of qx.ui.tabview.Page
  - overrride "_createChildControlImpl" and return an instance of your
button class instead of the normal radio button.


I hope this helps,

Best Fabian





--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstra├če 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: 0.7->0.8 issue: when not everything is a container

oetiker
Hi Fabian,

Today Fabian Jakobs wrote:

> Hi Tobias,
> > Experts,
> >
> > In 0.7 most widgets were also containers. So I could for example
> > add a checkbox to the tab of a tabview widget to enable/disable the
> > tab.
> >
> >    [tab1 x][tab2 x][tab3 x]______________________
> >    |                                             |
> >    |                                             |
> >    +----------------------------------------------
> >
> > In 0.8 I tried todo the same, but since the button widget is no
> > container, it seem that the easy way is blocked. Any idea how I
> > could get a another widget inside the tab-buttons of a tabview
> >
> The 0.7 method does not work but you can do it in 0.8 as well. One
> difference in the 0.8 tab view is that the tab pane and the tab button
> are combined in one widget: the tab page. You can subclass this widget
> and create your custom widget instead of a button. This is how you can
> do it:
>
> 1. Create your own button class:
>   - subclass qx.ui.form.RadioButton
>   - in the button's constructor you can add the checkbox using "_add"
>
> 2. Create a subclass of qx.ui.tabview.Page
>   - overrride "_createChildControlImpl" and return an instance of your
> button class instead of the normal radio button.

yep ... I guess I was looking for an easy way out ... :-)

cheers
tobi

>
>
> I hope this helps,
>
> Best Fabian
>
>
>
>
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel