List Info

Thread: C-Sharp (C#) Group: create custom web control for a button with rounded corners




C-Sharp (C#) Group: create custom web control for a button with rounded corners
user name
2006-07-18 11:03:53
Hi,
   is there any recommended approach for creating a web user
control
that is ultimately a web button with rounded corners?

Any information on this would be great

Thanks
Karen


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: create custom web control for a button with rounded corners
user name
2006-07-18 17:41:34
Karen,
     I would recommend using a "flat-styled"
button (using CSS) in the
middle position of a 9 cell table. Have the surrounding
cells fill the
need of the button's container, and allow your button in
the middle to
exact your server calls.

Another (and possibly more elegant) solution would be to
inherit the
Button control into a custom control (not a user control),
and override
it's rendering to accomplish the same. The real benefit to
this will be
the designer display, and the direct communication in code
(without
having the extra layer of the user control).

I hope that helps. If you need more detail or whatnot,
please let me
know.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: create custom web control for a button with rounded corners
user name
2006-07-18 17:48:38
You can simply use CSS to accomplish this. ; Make an image that has the button appearance you like, and then use the background-image property in a CSS class, and apply it to the button.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: create custom web control for a button with rounded corners
user name
2006-07-18 18:05:23
Marty,
     Unfortunately, that is inaccurate. In most cases,
button graphics
need to be scalable, not zoom-able. In order to make your
containment
graphics match regardless of the height or width of the
button, you
need to separate. There are no options in the background
category of
CSS to accomplish this.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: create custom web control for a button with rounded corners
user name
2006-07-18 19:27:57
Buttons do not generally need to scale in height, but do in width.  If a one size fits all image will not work, then I would recommend having a span button span setup that defines a left side, center and right side for the button.  The button itself would either have a repeating background image, or just a background color.  The left and right sides could have the rounded edges.

Of course, wrapping it all up into a child class of Button is still a good idea.

On 7/18/06, Lance May <gmail.com"> lancemaygmail.com> wrote:

Marty,
&nbsp; &nbsp;  Unfortunately, that is inaccurate. In most cases, button graphics
need to be scalable, not zoom-able. In order to make your containment
graphics match regardless of the height or width of the button, you
need to separate. There are no options in the background category of
CSS to accomplish this.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: create custom web control for a button with rounded corners
user name
2006-07-18 20:18:56
Marty,
     If you are going to go with a horizontal only scaling
button, I
agree with you completely on the spanning. It would be much
more
sensible, and give you a vertically tighter image. However,
I firmly
stand behind the Button inheritance, as it would make for
the most
developer-friendly experience. In essence, I would say that
using the
overridden rendering with the spanning option would probably
be the
most elegant solution to a customized we button.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )