-
1 Attachment(s)
Drawing Question
Hmmm.. I will really need help on this one..
I don't know even where to start from!
I would like to be able to draw a "table" like rectangle with certain colors (Yes, I know how to draw lines and how to draw rectangles :p That is not the problem, please keep reading) the problem is that the border of this "table" like rectangles look like the border of the buttons. In html I would only need to make a table and give it a certain color and a certain outline to make it look how I need it to look like.
The first thing I thought of was to use Buttons, but I cannot change the wide of their border, can I? I don't think so, while in a table you can do such a thing, which made me think of a table control... But I did not find any. So I thought about drawing lines and rectangles... And my problem is that I don't know how can I assing the color or how I would get a result like this based on a given color (I.E. If I am told the form's BackColor will be red, the table's left and top lines should be a light red while the bottom and the right should be dark red)
Since an image is worth more than 1000 words, I add a picture so you can tell what I wish to accomplish...
Thanks in advance!
-
Isn't there any Brush or Pen that would allow me to draw a rectangle with an "outset" border? :(
-
OK.
You best bet it to make a user control , or inherited control, and override the Paint method.
Once you do that... you can basically draw your own style border... you'll have to use just a little simple multiplication and division to figure out where and how wide the border should be. Then you just paint it with the pen and brush style you wish... (width, color, texture)..