|
-
Mar 9th, 2010, 02:04 PM
#1
Thread Starter
Addicted Member
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
-
Mar 9th, 2010, 02:09 PM
#2
Re: DropDown vs DropDownList
-
Mar 9th, 2010, 02:22 PM
#3
Thread Starter
Addicted Member
Re: DropDown vs DropDownList
yeap, Mobile Framework 3.5
-
Mar 9th, 2010, 03:43 PM
#4
Frenzied Member
Re: DropDown vs DropDownList
Does the full framework not behave in the same way when you do this?
-
Mar 9th, 2010, 04:08 PM
#5
Thread Starter
Addicted Member
Re: DropDown vs DropDownList
yes it does...whether it's windows mobile framework or the full 3.5
-
Mar 10th, 2010, 02:06 AM
#6
Frenzied Member
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
-
Mar 10th, 2010, 08:24 AM
#7
Thread Starter
Addicted Member
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
-
Mar 10th, 2010, 08:49 AM
#8
Frenzied Member
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
-
Mar 16th, 2010, 08:20 AM
#9
Thread Starter
Addicted Member
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 ??
-
Mar 16th, 2010, 09:34 AM
#10
Frenzied Member
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.
-
Mar 16th, 2010, 10:47 AM
#11
Thread Starter
Addicted Member
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....
-
Mar 16th, 2010, 12:48 PM
#12
Frenzied Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|