Results 1 to 12 of 12

Thread: DropDown vs DropDownList

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    174

    DropDown vs DropDownList

    Hi,
    I am trying to add a dropdown to my form.
    I want this form to have a 'title' incporparted in the control to save space.
    When I select DropDown for the DropDownStyle property everything is good because i can set the 'text' property to my title.
    The only problem is that at runtime I can 'edit' the dropdown and I don't want this. I want the behaviour to be like a 'DropDownList" but then when I try to set the title in the text property I can seem to set it (Visual Studio removes the title each time).

    If you could let me know any trick behind it please ?

    Thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: DropDown vs DropDownList

    Are you using VB.NET?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    174

    Re: DropDown vs DropDownList

    yeap, Mobile Framework 3.5

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: DropDown vs DropDownList

    Does the full framework not behave in the same way when you do this?
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    174

    Re: DropDown vs DropDownList

    yes it does...whether it's windows mobile framework or the full 3.5

  6. #6
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: DropDown vs DropDownList

    Ah - I thought you we chasing functionality that existed in the full framework, but not in the compact framework.

    Why not use a normal dropdown. Populate your combo, and then insert the first item in your list to the title you want. Set the listindex to 0 and your title will show. Programatically disallow the selection of the first item in your combo.

    Not elegant (or intuitive) but should do what you are asking
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    174

    Re: DropDown vs DropDownList

    I thought about this solution and there are many other alternatives as well but as you said it's not elegant.
    I am looking for an elegant solution and don't understand why when the dropdown has a title the user can 'edit' the list...

    There must be some way to do this in a professional programmer's way ? I don't want to 'play' with my data in any way

  8. #8
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: DropDown vs DropDownList

    The style you chose allows the user to add items to the list - that is inherent in the design.

    You could derive your own and re-design it
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    174

    Re: DropDown vs DropDownList

    So are you saying pretty much that I can't do what I want and I have to derive a whole new component to have the functionality I need ??

  10. #10
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: DropDown vs DropDownList

    Looks that way - it appears you can't do what you want in the full framework either.

    I can think of very few (if any) instances where there is more functionality in .Net CF components than in their desktop counterparts.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    174

    Re: DropDown vs DropDownList

    So how can I change my component and adapt it ?
    I am looking for a step by step process showing how an existing component has been customized... any component

    I can handle the programming, it's just i don't know the 'principles', ie what goes where, what do i have to add to my program....

  12. #12
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: DropDown vs DropDownList

    There is an article here that would give you a start. Also try http://www.codeproject.com/KB/cpp/flatcombo.aspx

    Alternately, one of the Resco controls such as advancelist MAY do what you need.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width