How to change a control between a combobox and a textbox depending on where you call the form?

5 posts, 0 answers
  1. Ana
    Ana avatar
    3 posts
    Member since:
    Mar 2009

    Posted 05 May 2009 Link to this post

    Hello!!!

    I'm using the telerik library, 2008 version. I want to have a unique form that is called from two different options in the menu and depending on the option you select in should show a label and a combobox or a label and a textbox. The label is easy to change, but how do i do to change between the combobox and the textbox? I tried put it over and set the visible attribute to false but it's not working because i have everything inside a table layout and it only lets me put one control in every cell.

    Do you have any ideas? Thanks!!

    Ana Mora
  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 06 May 2009 Link to this post

    Hello Ana,

    Thank you for contacting us. You can create a base form and then derive that form twice.

    Sincerely yours,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 06 May 2009 Link to this post

    Hi,

    A suggestion would be to use a panel to contain the controls . You could place the label and combo in one panel  and the other label and textbox in another panel. Hiding one panel would shift the other up. This way you dont need to individually show and hide the controls.

    Please feel free to correct me.

    Thanks
    Princy


  5. Nick
    Admin
    Nick avatar
    767 posts

    Posted 07 May 2009 Link to this post

    Hi Princy,

    That seems like a good solution too.

    Sincerely yours,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Ana
    Ana avatar
    3 posts
    Member since:
    Mar 2009

    Posted 07 May 2009 Link to this post

    Thank you!!! I tried both solutions and they worked for me!!

    Ana Mora
Back to Top
UI for WinForms is Visual Studio 2017 Ready