Custom control question
-
Ok, I am back ;P I have a simple custom control. I would like to set a black border around it. However, there is no SetBorder or BorderStyle property for a Control object. Is there a way to do it, or do I have to draw a line around the control? Thanks, Pankaj Without struggle, there is no progress
-
Ok, I am back ;P I have a simple custom control. I would like to set a black border around it. However, there is no SetBorder or BorderStyle property for a Control object. Is there a way to do it, or do I have to draw a line around the control? Thanks, Pankaj Without struggle, there is no progress
Hi, I would drop a panel in there, set it to DockStyle.Fill, then set its borders up like you want to. Then drop the rest of the control inside the panel. :) Hope this helps MYrc : A .NET IRC client with C# Plugin Capabilities. See http://sourceforge.net/projects/myrc for more info. :-D
-
Hi, I would drop a panel in there, set it to DockStyle.Fill, then set its borders up like you want to. Then drop the rest of the control inside the panel. :) Hope this helps MYrc : A .NET IRC client with C# Plugin Capabilities. See http://sourceforge.net/projects/myrc for more info. :-D
There is just one problem. This control represents a resource in an experiment. I would have multiple resources one after the other and they would be stacked in that order. So, I would have to have a panel for every resource that I add. I think this could be an overkill. Don't you think so? If there was just one control, it would be all right, I think. Thanks, Pankaj Without struggle, there is no progress
-
There is just one problem. This control represents a resource in an experiment. I would have multiple resources one after the other and they would be stacked in that order. So, I would have to have a panel for every resource that I add. I think this could be an overkill. Don't you think so? If there was just one control, it would be all right, I think. Thanks, Pankaj Without struggle, there is no progress
I'm not so sure what u mean, but i dont think there should be a problem. Best is to try it. It would only require a few extra lines in the control, so trying isnt an issue :) pankajdaga wrote: Without struggle, there is no progress :-D MYrc : A .NET IRC client with C# Plugin Capabilities. See http://sourceforge.net/projects/myrc for more info. :-D
-
I'm not so sure what u mean, but i dont think there should be a problem. Best is to try it. It would only require a few extra lines in the control, so trying isnt an issue :) pankajdaga wrote: Without struggle, there is no progress :-D MYrc : A .NET IRC client with C# Plugin Capabilities. See http://sourceforge.net/projects/myrc for more info. :-D
Hey again, I tried it and it works, no problem. However, the problem is that I have multiple controls ( typically 100 or so, can run higher) that I instantiate at run-time. I think it would be a lot of overhead to add a panel for each of them. Since, I only need a black frame around it, I just draw lines at the edges of the control and that works fine :-) Thanks for the help though. This solution is perfect if you have only a few controls on the form :-) Pankaj Without struggle, there is no progress
-
Hey again, I tried it and it works, no problem. However, the problem is that I have multiple controls ( typically 100 or so, can run higher) that I instantiate at run-time. I think it would be a lot of overhead to add a panel for each of them. Since, I only need a black frame around it, I just draw lines at the edges of the control and that works fine :-) Thanks for the help though. This solution is perfect if you have only a few controls on the form :-) Pankaj Without struggle, there is no progress
pankajdaga wrote: Since, I only need a black frame around it, I just draw lines at the edges of the control and that works fine thats wot I was gonna advise until I read the whole post.
:suss: Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk
:suss:"All programmers are playwrights and all computers are lousy actors." -
Ok, I am back ;P I have a simple custom control. I would like to set a black border around it. However, there is no SetBorder or BorderStyle property for a Control object. Is there a way to do it, or do I have to draw a line around the control? Thanks, Pankaj Without struggle, there is no progress