Re: Updating a control in design time



Hi!

I have been struggeling for a while with this, but perhaps you can supply me
with a link on msdn on how to do this.

Regards
Martin

"Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> skrev i meddelandet
news:OBXT8%23H4FHA.472@xxxxxxxxxxxxxxxxxxxxxxx
> You would have to create a Custom Designer for the Control.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> A watched clock never boils.
>
> "Visual Systems AB (Martin Arvidsson)" <martin.arvidsson@xxxxxxxx> wrote
in
> message news:O$j3$nH4FHA.1864@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi!
> >
> > Created an inherited combobox, (with a little help) how ever. When i set
> > the
> > property
> > CharacterCase to false, i must rebuild the project in order for the text
> > to
> > be in non uppercase.
> > Is there a method to use to redraw the control, i have tried, see code
> > below.
> >
> > Regards
> > Martin
> >
> > <---- CODE ----->
> > class UCComboBox : ComboBox
> > {
> > private bool _CharacterCase = true;
> >
> > protected override CreateParams CreateParams
> > {
> > get
> > {
> > const int CBS_UPPERCASE = 0x2000;
> > CreateParams cp = base.CreateParams;
> > if (_CharacterCase)
> > cp.Style |= CBS_UPPERCASE;
> > return cp;
> > }
> > }
> >
> > public bool CharacterCase
> > {
> > get
> > {
> > return _CharacterCase;
> > }
> > set
> > {
> > _CharacterCase = value;
> > this.Invalidate();
> > }
> > }
> > }
> >
> >
>
>


.



Relevant Pages