Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows Form Controls [modified]

Windows Form Controls [modified]

Scheduled Pinned Locked Moved C#
csharpdotnetdesignquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ankit Rajpoot
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • A Ankit Rajpoot

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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 :^)

      A 1 Reply Last reply
      0
      • L Lost User

        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 :^)

        A Offline
        A Offline
        Ankit Rajpoot
        wrote on last edited by
        #3

        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

        L 1 Reply Last reply
        0
        • A Ankit Rajpoot

          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

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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 :)

          A 1 Reply Last reply
          0
          • L Lost User

            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 :)

            A Offline
            A Offline
            Ankit Rajpoot
            wrote on last edited by
            #5

            Naaaahhhhh I'm talking about their sliding property. The way they slide into view when the mouse hovers over them.

            L 1 Reply Last reply
            0
            • A Ankit Rajpoot

              Naaaahhhhh I'm talking about their sliding property. The way they slide into view when the mouse hovers over them.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              That's not a standard property, you'll need a third-party library or you'll have to code the functionality yourself. Sorry, but I can't really help there. You could slide a form into view once you hover a panel, or you search the CodeProject :)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups