Hi Stefan,
I'm not a qooxdoo developper, but I think I can answer some of your
questions.
>Is there a particular reason to separate this as the Button per se is the
same in both places?
- they don't look the same, so they can't be the same. They use a different
appearance theme.
- I think the toolbar button also doesn't do focus. As the actions
important enough on a toolbar are supposed to have keyboard shortcuts. (just
like a real desktop application, where you also can't focus the toolbar)
So, they are not the same. Although I think the differences are just:
setAppearance('toolbar-button');
setFocusable( false );
1) Is there an intention not to be able to add the widgets TextField, Label
and Slider to a Toolbar?
Well, if you add a textField to a normal container, it looks silly as well.
You often end up using some sort of layout or a form renderer to make it
look pretty.
The toolbar already defines a layout: the horizontal-box layout.
I agree it there was a ready to go textfield and atom equivalent for a
toolbar.
But for any reasonably sized project, you are going to have to add your own
appearance-themes anyway.
Just add something like this to your Appearance.js in your theme directory:
toolbar-textfield:{
include: 'textfield',
styles:function(states){
return { growY: true, margin: 5 }
}
}
Then set the appearance of your textfield to 'toolbar-textfield' before you
add to your toolbar.
> When adding TextField, Label and Slider to a Toolbar they distort the
layout of the Toolbar. Is it your intention to create a new instance for
these in qx.ui.toolbar or is the intention to have only one implementation
of respective?
For a lot of common stuff, they have nice ready to go widgets with
appropiate appearance themes.
The intention is not, I think, to cover every possible use-case for every
possible type of application.
Rather, that they provide a bunch of default widgets, you can build on.
For example, adding a text-field to a Toolbar, means you have a focusable
widget there. I'm not sure how that will work properly.
If you just like the way a toolbar works, you can just as easily roll your
own.
It's just a " qx.ui.container.Composite( new qx.ui.layout.VBox ) " with the
appearance set to 'toolbar'
I personally never directly use any of the qooxdoo 'styled' widgets
immediately.
I almost always sub-class them. That way I can easily modify their behavior,
when I need to, and can still easily upgrade to newer versions of qooxdoo.
This should suit your use-case as well. Because real toolbars shouldn't be
focusable, so you don't want a toolbar, you just want it to look like one.
Which is why I'm suggesting you just roll-your-own.
>Now I can see that the qx.ui.toolbar.Button also distorts the Part widget's
vertical lines.... -> bug?
I'm not sure what you mean by that.
-- Greetings
-- Ralf ( @ gong.nl )
2010/7/31 Stefan Andersson <[email protected]>
> 1) Is there an intention not to be able to add the widgets TextField,
> Label and Slider to a Toolbar?
>
> 2) I have noticed that there are implementations of Button in both
> qx.ui.form as well as in qx.ui.toolbar to satisfy requirements in each
> place. Is there a particular reason to separate this as the Button per se is
> the same in both places?
>
> 3) When adding TextField, Label and Slider to a Toolbar they distort the
> layout of the Toolbar. Is it your intention to create a new instance for
> these in qx.ui.toolbar or is the intention to have only one implementation
> of respective?
>
> Or do you have any other solution to these problems/differences?
>
> I wish to add the above mentioned widgets in a toolbar.
>
> Stefan
>
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel