D
David Clegg
I need to be able to change many attributes on a ComboBox (e.g
background and border colour), and as this isn't currently supported by
the native framework ComboBox, I've attempted a quick and dirty
implementation myself. I know .NET CF Service Pack 2 improves the
situation somewhat, is still not flexible enough for our needs.
Because I didn't want to re-invent the wheel, I thought it would be
easiest to descend from Control, paint the textbox and drop down arrow
portion myself, and use an internal ListBox (actually ListBoxEx from
SmartDeviceFramework to be precise) for the drop down list. The listbox
is shown or hidden depending on the what the combobox dropdown state
should be. I also delegate any public combobox properties, methods and
events to the internal listbox (although I've currently only
implemented the ones our app directly accesses).
I thought I had this custom combobox nailed, but yesterday discovered I
have problems with the listbox only painting within the confines of
it's parent control. For example, if the combobox is on a panel the
listbox will not paint beyond the bounds of the panel, whereas a
standard combobox dropdown list would.
Is there an easier way to achieve my goal?
I can post my compete combobox implementation if it will help to see
the error in my ways, but it will have to come with a huge "Ugly Code"
disclaimer
--
Cheers,
David Clegg
(e-mail address removed)
Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489
Now supports Google Groups searching with Dyna-extend(tm) technology!
QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com
"When I first heard that Marge was joining the police academy, I
thought it would be fun and zany, like that movie -- Spaceballs. But
instead it was dark and disturbing like that movie, Police Academy." -
Homer Simpson
background and border colour), and as this isn't currently supported by
the native framework ComboBox, I've attempted a quick and dirty
implementation myself. I know .NET CF Service Pack 2 improves the
situation somewhat, is still not flexible enough for our needs.
Because I didn't want to re-invent the wheel, I thought it would be
easiest to descend from Control, paint the textbox and drop down arrow
portion myself, and use an internal ListBox (actually ListBoxEx from
SmartDeviceFramework to be precise) for the drop down list. The listbox
is shown or hidden depending on the what the combobox dropdown state
should be. I also delegate any public combobox properties, methods and
events to the internal listbox (although I've currently only
implemented the ones our app directly accesses).
I thought I had this custom combobox nailed, but yesterday discovered I
have problems with the listbox only painting within the confines of
it's parent control. For example, if the combobox is on a panel the
listbox will not paint beyond the bounds of the panel, whereas a
standard combobox dropdown list would.
Is there an easier way to achieve my goal?
I can post my compete combobox implementation if it will help to see
the error in my ways, but it will have to come with a huge "Ugly Code"
disclaimer
--
Cheers,
David Clegg
(e-mail address removed)
Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489
Now supports Google Groups searching with Dyna-extend(tm) technology!
QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com
"When I first heard that Marge was joining the police academy, I
thought it would be fun and zany, like that movie -- Spaceballs. But
instead it was dark and disturbing like that movie, Police Academy." -
Homer Simpson