Hi Jim,

I have posted an example on how to modify appearances in the wiki some weeks
ago.

   http://qooxdoo.org/documentation/developer_manual/appearances

It's not complicated to manipulate appearances at all.


Jim Hunter-2 wrote:
> 
> The Wiki is flawed, the API Docs don't have any examples of how to
> manipulate the appearance info, and your suggestions talk in theory. If
> all
> I want to do, like you suggest, is to remove the backgroundcolor from the
> toolbarbutton so that I can then use setBackgroundColor, can you please
> show
> some code to achieve this?
> 
> Thanks,
> Jim
> 
> 
> 
> On 9/13/06, Sebastian Werner <[EMAIL PROTECTED]> wrote:
>>
>> IMHO, the documentation does not follow the way to go. It's better to
>> define an own separate appearance theme and not to modify the existing
>> one.
>>
>> Try your look with inheritance and configure the default appearance
>> theme afterwards would be IMHO the better way.
>>
>> Cheers,
>>
>> Sebastian
>>
>>
>>
>> Jim Hunter schrieb:
>> > Well, I tried to do what the Wiki suggested but it failed on the first
>> > line. Here is what I was going to try:
>> >
>> > theme =
>> > qx.manager.object.AppearanceManager.getInstance().getAppearanceTheme();
>> > theme.registerAppearance ("myButton",
>> >   {
>> >     setup : function()
>> >     {
>> >       this.bgcolor_default = new
>> > qx.renderer.color.ColorObject("buttonface");
>> >       this.bgcolor_left = new qx.renderer.color.Color("#FFF0C9");
>> >
>> >       this.border_pressed = qx.renderer.border.BorderPresets.thinInset;
>> >       this.border_over = qx.renderer.border.BorderPresets.thinOutset;
>> >       this.border_default = null;
>> >
>> >       this.checked_background = "static/image/dotted_white.gif";
>> >     },
>> >
>> >     initial : function(vWidget, vTheme)
>> >     {
>> >       return {
>> >         cursor : qx.constant.Core.DEFAULT,
>> >         spacing : 4,
>> >         width : qx.constant.Core.AUTO ,
>> >         verticalChildrenAlign : qx.constant.Layout.ALIGN_MIDDLE
>> >       }
>> >     },
>> >
>> >     state : function(vWidget, vTheme, vStates)
>> >     {
>> >       var vReturn =
>> >       {
>> >         backgroundImage : vStates.checked && !vStates.over ?
>> > this.checked_background : null
>> >       }
>> >
>> >       if (vStates.pressed || vStates.checked || vStates.abandoned) {
>> >         vReturn.border = this.border_pressed;
>> >       } else if (vStates.over ) {
>> >         vReturn.border = this.border_over;
>> >       } else {
>> >         vReturn.border = this.border_default;
>> >       }
>> >
>> >       if (vStates.pressed || vStates.checked || vStates.abandoned)
>> >       {
>> >         vReturn.paddingTop = 3;
>> >         vReturn.paddingRight = 2;
>> >         vReturn.paddingBottom = 1;
>> >         vReturn.paddingLeft = 4;
>> >       }
>> >       else if (vStates.over)
>> >       {
>> >         vReturn.paddingTop = vReturn.paddingBottom = 2;
>> >         vReturn.paddingLeft = vReturn.paddingRight = 3;
>> >       }
>> >       else
>> >       {
>> >         vReturn.paddingTop = vReturn.paddingBottom = 3;
>> >         vReturn.paddingLeft = vReturn.paddingRight = 4;
>> >       }
>> >
>> >       return vReturn;
>> >     }
>> >   }
>> > )
>> > qx.Proto = qx.OO.classes["qx.ui.toolbar.ToolBarButton"].prototype;
>> > qx.Proto.setAppearance('myButton');
>> >
>> >
>> > But unfortunately, the very first line of code causes the app to fail.
>> > Am I close with the above code or am I way off base? I am not going to
>> > be up much longer, have been at the computer for the last 17 hours...
>> >
>> > Thanks,
>> > Jim
>> >
>> >
>> >
>> > On 9/13/06, *Sebastian Werner* <[EMAIL PROTECTED]
>> > <mailto:[EMAIL PROTECTED]>> wrote:
>> >
>> >     Jim Hunter schrieb:
>> >      > I found the Wiki on Appearance changes and it starts out by
>> >     saying that
>> >      > you can control the appearance of individual widgets yet there
>> is
>> no
>> >      > example in the Wiki of how to do that. Telling you that it can
>> be
>> >     done
>> >      > is not the same as showing you how it's done on a single widget
>> >     level.
>> >      > And looking at the source code does not tell me how the class is
>> >     used to
>> >      > change a single widget. So please,. is it possible to get an
>> >     example of
>> >      > how to change the appearance of a single widget?
>> >
>> >     The appearance is a property of each widget. You can just use
>> >     "setAppearance(ID);". You can also define a appearance for each
>> button,
>> >     but I don't think this is a good way. Better use one appearance for
>> all
>> >     widgets which have a lot of things in common e.g. all your toolbar
>> >     buttons.
>> >
>> >     Cheers,
>> >
>> >     Sebastian
>> >
>> >
>> >      >
>> >      > Here is the Wiki for Appearances
>> >      > http://qooxdoo.org/documentation/developer_manual/appearances
>> >      >
>> >      > Thanks,
>> >      > Jim
>> >      >
>> >      >
>> >      >
>> >
>> >
>> >
>> >
>> ------------------------------------------------------------------------
>> >
>> >
>> -------------------------------------------------------------------------
>> > Using Tomcat but need to do more? Need to support web services,
>> security?
>> > Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> >
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> >
>> >
>> >
>> ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > qooxdoo-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Background-color-of-buttons-tf2263055.html#a6281529
Sent from the qooxdoo-devel forum at Nabble.com.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to