Great! It works!
from leo.plugins.mod_scripting import scriptingController
> sc = scriptingController(c)
>
> TempButtonHold = sc.createIconButton( p.h, command = "", statusLine = p.h,
> bg="blue" )
> TempButtonHold.button.setStyleSheet("QWidget {background-color: green }")
Will create a green button :)
On Wednesday, May 29, 2013 1:00:55 AM UTC+2, Terry wrote:
>
> On Tue, 28 May 2013 15:09:50 -0700 (PDT)
> Fidel Pérez <[email protected] <javascript:>> wrote:
>
> > Hi, Im creating a big deal of buttons using this script, but it will not
> > produce buttons with other color than "lightblue". I have tried
> everything
> > (even switching all the lightsteelblue1 within Leopyref and
> leoguiplugins
> > etc but no success). Any suggestion on what to read to fix this?
>
> I meant to mention that when I was looking at it before. The button
> color parameter is still required, but does nothing, there's a comment
> in the source the the stylesheet should be used instead. More
> attributes would need to be set on the button to make that truly
> versatile, and even then that might not suit your use case.
>
> You could try setting the QPushButton's color directly, it's
> the .button attribute of the action descendant returned by the
> scripting controller.
>
> Cheers -Terry
>
> > from leo.plugins.mod_scripting import scriptingController
> > > sc = scriptingController(c)
> > > sc.createIconButton( MyNode.h, command = MyCommand, statusLine =
> MyNode.h,
> > > bg="green" )
> >
> >
> > This will create another lightsteelblue button.
> >
> > The "create-script-button" button is the only one which works and is
> > yellow, searched it through the code but got no good conclusions out of
> it.
> >
> > Also got the working "prev" and "next" icon (with a green arrow) from
> some
> > plugin I dont know which one is it. Im using pyqt.
> >
> > Thanks!
> >
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.