Windows Form Controls [modified]
-
Hello friends, I'm using VS2005 (.Net Framework 2.0). I have a few problems with the Windows Form controls. First, I've searched and searched, but couldn't find a horizontal separator control, like the one we see in the File Properties dialog box, in the Windows Form Controls library. Is there a way to add such a control to my forms or I have to derive a new class? Second, the textbox control doesn't support transparent background. I've searched the Codeproject articles, but they all suggest long and complex method for the purpose. If someone can please suggest a sweet and simple solution, I'd be very grateful. I'm developing a new application and deriving new classes just to implement a new UI element is a time-consuming and complex affair. Many thanks in advance.
modified on Saturday, October 25, 2008 8:56 AM
-
Hello friends, I'm using VS2005 (.Net Framework 2.0). I have a few problems with the Windows Form controls. First, I've searched and searched, but couldn't find a horizontal separator control, like the one we see in the File Properties dialog box, in the Windows Form Controls library. Is there a way to add such a control to my forms or I have to derive a new class? Second, the textbox control doesn't support transparent background. I've searched the Codeproject articles, but they all suggest long and complex method for the purpose. If someone can please suggest a sweet and simple solution, I'd be very grateful. I'm developing a new application and deriving new classes just to implement a new UI element is a time-consuming and complex affair. Many thanks in advance.
modified on Saturday, October 25, 2008 8:56 AM
Ankit Rajpoot wrote:
I have to derive a new class?
You could use a Panel, set it's border to Fixed3D and set it's Height to 4. Seriously, create a new user-control and write a paint-handler. You'll need to draw two lines on the canvas.
Ankit Rajpoot wrote:
Second, the textbox control doesn't support transparent background.
With good reason; even the login-screen of World of Warcraft doesn't use transparancy in the input-controls. It will be harder for the user to read what he/she has typed. You could use a label, and add/remove characters (from the .Text property) as the user presses keys (OnKeyPress event). Not a pretty solution, though :^)
-
Ankit Rajpoot wrote:
I have to derive a new class?
You could use a Panel, set it's border to Fixed3D and set it's Height to 4. Seriously, create a new user-control and write a paint-handler. You'll need to draw two lines on the canvas.
Ankit Rajpoot wrote:
Second, the textbox control doesn't support transparent background.
With good reason; even the login-screen of World of Warcraft doesn't use transparancy in the input-controls. It will be harder for the user to read what he/she has typed. You could use a label, and add/remove characters (from the .Text property) as the user presses keys (OnKeyPress event). Not a pretty solution, though :^)
Hello eddyvluggen, What I need a transparent textbox is for displaying the path of a file in a properties dialog box. The path may be longer than the width of the dialog box, so the best solution would be to use a textbox that has its ReadOnly property set to true. So that the user can click in the textbox and then use his/her mouse or arrow keys to see the complete path. I don't need to type anything in it, I just need it to display in it. One more thing, I'd like to ask is that how can I implement the sliding panels in my application like the ones we see in VS itself (for solution explorer and properties and the toolbox.) Thanks
-
Hello eddyvluggen, What I need a transparent textbox is for displaying the path of a file in a properties dialog box. The path may be longer than the width of the dialog box, so the best solution would be to use a textbox that has its ReadOnly property set to true. So that the user can click in the textbox and then use his/her mouse or arrow keys to see the complete path. I don't need to type anything in it, I just need it to display in it. One more thing, I'd like to ask is that how can I implement the sliding panels in my application like the ones we see in VS itself (for solution explorer and properties and the toolbox.) Thanks
Ankit Rajpoot wrote:
I don't need to type anything in it, I just need it to display in it.
Sounds plausible :) How about a word-wrapped tooltip?
Ankit Rajpoot wrote:
One more thing, I'd like to ask is that how can I implement the sliding panels in my application like the ones we see in VS itself
Use a Panel and set the AutoScroll property to 'true'. Next, drop the control that you want scrollbars on, into the panel. Set it's height and width so that it's larger then the Panel itself, and scrollbars will appear. Good luck :)
-
Ankit Rajpoot wrote:
I don't need to type anything in it, I just need it to display in it.
Sounds plausible :) How about a word-wrapped tooltip?
Ankit Rajpoot wrote:
One more thing, I'd like to ask is that how can I implement the sliding panels in my application like the ones we see in VS itself
Use a Panel and set the AutoScroll property to 'true'. Next, drop the control that you want scrollbars on, into the panel. Set it's height and width so that it's larger then the Panel itself, and scrollbars will appear. Good luck :)
Naaaahhhhh I'm talking about their sliding property. The way they slide into view when the mouse hovers over them.
-
Naaaahhhhh I'm talking about their sliding property. The way they slide into view when the mouse hovers over them.