locked
popup textbox RRS feed

  • Question

  • im looking to have a text box popup when a button is clicked, like a input
    box sort of deal, on have it float by the button.
     
    so if there is a button called Add User, a small text box pops up in that
    area to allow you to type in the username and hit enter.
     
    I've tossed around a few ideas on how to do this but nothing is sitting
    well..
     
    one way was to create a form, and then put the textbox on the form and
    create an instance of that form... I could then do some magic with creating
    a rounded form and give it a drop shadow sort of deal... can be done, lot of
    code for something that should be simple..
     
    the other thought was to just generate the textbox and screw around with its
    display properties, which would be easiest, but I wasn’t able to make it
    look like that great...
     
    how would you make a floating text/input box?
     

    Justin Rich
    http://jrich523.wordpress.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Moved by CoolDadTx Thursday, August 25, 2011 7:43 PM Winforms related (From:Visual C# General)
    Thursday, August 25, 2011 6:23 PM

Answers


  • If you want it to "float" so the user can move it independent of the form, then make it a separate form.  If you don't want the user to be able to move the textbox, then just make it a control on the current form, and toggle the visibility as needed.

    --
    Mike
    • Proposed as answer by DiegoCattaruzza Friday, August 26, 2011 8:33 AM
    • Marked as answer by Helen Zhou Friday, September 2, 2011 2:08 AM
    Thursday, August 25, 2011 10:53 PM
  • Hi jrich,

    You can use this kind of Floating Popup Control. The basic idea of  displaying your own form in the floating popup control, is to implement an interface named IFloatingPopup.

    Hope it helps.

    Best wishes,

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Helen Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Surya K C Wednesday, August 31, 2011 2:56 PM
    • Marked as answer by Helen Zhou Friday, September 2, 2011 2:06 AM
    Friday, August 26, 2011 8:12 AM

All replies

  • Hi, good day jrich.

    What kind of .NET technology are you developing? :)

    Based on your ideas, if you want to make the button good, you have to use another Microsoft development tool. And i would suggest to make use of Microsoft Expression. i think, it will solve your problem easily.

    Have a look at Microsoft Expression Blend.

    http://www.microsoft.com/expression/

    Note: WPF application.

     

    Another thing, your first idea isn't bad. Normally, if you are using windows form application, most of the developers tend to create a new form and just create an instance of that form or even displaying it on the top of the panel and adjust its location. Well, those are just my thoughts about this situation. :D

     

    Eric


    Failure is not the worst thing in the world. The very worst is not to try. Email Address : ericjohnadamos@gmail.com. http://ericjohnadamos.blogspot.com/


    Thursday, August 25, 2011 7:18 PM
  • sorry, just a basic windows forms app... I rarely dev so I havent really looked at WPF or any of the newer stuff..
     
    its .net 4.0 though
     
    basically I don�??t want to waste the form space with another text box, but im only asking for one field so I don�??t want to make a whole input dialog. I�??d like something slick to pop up right at the box, have focus, allow you to type and hit enter and have it go do its thing...
     
    I guess the tricky part is I�??d like it to look good... a bit of a boarder with a shadow of sorts would be nice so that it doesn�??t just look like a textbox dumped on the form...
     
    thanks

    Justin Rich
    http://jrich523.wordpress.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, August 25, 2011 7:31 PM

  • If you want it to "float" so the user can move it independent of the form, then make it a separate form.  If you don't want the user to be able to move the textbox, then just make it a control on the current form, and toggle the visibility as needed.

    --
    Mike
    • Proposed as answer by DiegoCattaruzza Friday, August 26, 2011 8:33 AM
    • Marked as answer by Helen Zhou Friday, September 2, 2011 2:08 AM
    Thursday, August 25, 2011 10:53 PM
  • Hi jrich,

    You can use this kind of Floating Popup Control. The basic idea of  displaying your own form in the floating popup control, is to implement an interface named IFloatingPopup.

    Hope it helps.

    Best wishes,

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Helen Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Surya K C Wednesday, August 31, 2011 2:56 PM
    • Marked as answer by Helen Zhou Friday, September 2, 2011 2:06 AM
    Friday, August 26, 2011 8:12 AM