Pushbutton backcolor?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Pushbutton backcolor?

Chris Hayes-4
I set the background color of a PushButton in the ViewComposer but it
doesn't seem to have any effect.  The button always appears with a gray
background.  Any known workaround?

Regards,

Chris Hayes


Reply | Threaded
Open this post in threaded view
|

Re: Pushbutton backcolor?

Bill Schwab-2
Chris,

> I set the background color of a PushButton in the ViewComposer but it
> doesn't seem to have any effect.  The button always appears with a gray
> background.  Any known workaround?

There was some mention of this recently.  I don't recall the outcome, but a
quick search of Ian's archives should turn it up.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Pushbutton backcolor?

Bill Dargel
In reply to this post by Chris Hayes-4
Chris Hayes wrote:

> I set the background color of a PushButton in the ViewComposer but it
> doesn't seem to have any effect.  The button always appears with a gray
> background.  Any known workaround?

The standard Windows PushButton is only rendered in the color set by the
control panel (usually gray), totally ignoring its backcolor attribute. The
only way to get the PushButton to behave differently is to draw it
yourself.

I've done just that, making a DrawnPushButton subclass. I spent some time
tweaking it so that the bits drawn for  highlights and shadows and the
dotted box that indicates focus look just like a regular PushButton (when
the backcolor is gray). Actually, I take that back. I did make the dotted
focus highlight move (like the text does) when the button is selected, as I
think that enhances the 3d effect.

In addition to dealing with the backcolor, it has an #isCentered aspect.
This governs whether the text on the button is centered or left aligned.
There still may be some things of push button that it's not handling, but
so far, it does everything that I've wanted.

You can find it at:

   http://www.shoshana.com/downloads/ST%20DrawnPushButton.pac

It's never been extracted from my current image until just now, so there
may be a few screws loose. ;-) Let me know of any issues, and I'm sure we
can get them worked out.

Hopefully you, or others, will find this useful.

regards,
-Bill


-------------------------------------------
Bill Dargel            [hidden email]
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105  USA


Reply | Threaded
Open this post in threaded view
|

Re: Pushbutton backcolor?

Bill Dargel
Bill Dargel wrote:

> You can find it at:
>
>    http://www.shoshana.com/downloads/ST%20DrawnPushButton.pac
>
> It's never been extracted from my current image until just now, so there
> may be a few screws loose. ;-)

Yep, it was true. :-(

There were some missing Win32Contstants. I added them to the package preinstall
script and have refreshed the package file. (And briefly the above file was
missing the methods that used the constants). Bottom line: if you already
grabbed the package, you'll want to get it again.

regards,
-Bill

-------------------------------------------
Bill Dargel            [hidden email]
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105  USA


Reply | Threaded
Open this post in threaded view
|

Re: Pushbutton backcolor?

Stefan Schmiedl
In reply to this post by Bill Dargel
On Mon, 05 May 2003 21:44:22 -0400,
Bill Dargel <[hidden email]> wrote:
>
> You can find it at:
>
>    http://www.shoshana.com/downloads/ST%20DrawnPushButton.pac
>

Sorry Bill,
I can't get it. Is the URL correct?

thanks,
s.


Reply | Threaded
Open this post in threaded view
|

Re: Pushbutton backcolor?

Bill Dargel
Stefan Schmiedl wrote:

> On Mon, 05 May 2003 21:44:22 -0400,
> Bill Dargel <[hidden email]> wrote:
> >
> > You can find it at:
> >
> >    http://www.shoshana.com/downloads/ST%20DrawnPushButton.pac
> >
>
> Sorry Bill,
> I can't get it. Is the URL correct?

Yes, it's correct. I can access the above using either Netscape 4.05 or
Internet Explorer 5.5. And according to the server logs, someone in
Germany got it successfully using Opera 6.03 on Linux!

Let me know if you still have a problem. I'd like to figure it out, if
there's something wrong on my end. If need be, I could always email it
to you.

regards,
-Bill

-------------------------------------------
Bill Dargel            [hidden email]
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105  USA


Reply | Threaded
Open this post in threaded view
|

Re: Pushbutton backcolor?

Chris Uppal-3
In reply to this post by Stefan Schmiedl
Stefan Schmiedl wrote:
> I can't get it. Is the URL correct?

Are you trying to follow the link as displayed in Outlook Express ?  It seems
that it (OE) translates the %20 into a space under some circumstances, and
trying to fetch the URL using a space results in a 403 (you do not have
permission...) error  (which is correct -- spaces are not legal in URLs)

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Pushbutton backcolor?

Stefan Schmiedl
In reply to this post by Bill Dargel
On Tue, 06 May 2003 19:47:57 -0400,
Bill Dargel <[hidden email]> wrote:

> Stefan Schmiedl wrote:
>
>> On Mon, 05 May 2003 21:44:22 -0400,
>> Bill Dargel <[hidden email]> wrote:
>> >
>> > You can find it at:
>> >
>> >    http://www.shoshana.com/downloads/ST%20DrawnPushButton.pac
>> >
>>
>> Sorry Bill,
>> I can't get it. Is the URL correct?
>
> Yes, it's correct. I can access the above using either Netscape 4.05 or
> Internet Explorer 5.5. And according to the server logs, someone in
> Germany got it successfully using Opera 6.03 on Linux!

Dang! Caught in the act! Server logs are a beautiful thing, indeed.
But: Opera claimed to have some difficulties, as it shows the
error message "Unknown document or no document specified."

wget however works fine, so it's probably some stupid file
type error in Opera or something like that.

>
> Let me know if you still have a problem. I'd like to figure it out, if
> there's something wrong on my end. If need be, I could always email it
> to you.

Thanks for the offer, but it looks like the good ol' command line
tool did the job.

Sorry for the noise,
s.


Reply | Threaded
Open this post in threaded view
|

Re: Pushbutton backcolor?

Stefan Schmiedl
In reply to this post by Chris Uppal-3
On Wed, 7 May 2003 08:57:22 +0100,
Chris Uppal <[hidden email]> wrote:
>
> Stefan Schmiedl wrote:
>> I can't get it. Is the URL correct?
>
> Are you trying to follow the link as displayed in Outlook Express ?  It seems

I *never* touch that thing. I make my mistakes with Linux software :-)

s.