Hi,

I created a WComboBox and set a WValdidator with setMandatory(true) on it.

* When it stats with the default selection (select 0) its shown with
the empty option selected with invalid visual.
* When it start with a different selection (eg select1) it continues
showing the invalid visual untill the user starts changing the value.
:-(

In both cases the user can change the value back to the empty option
and does not get the invalid visual. :-(

example snippet for reproduction (place directly into derived WApplication):
      WLabel* label = new WLabel("With empty value (select 1)", root());
      WComboBox* cb = new WComboBox(root());
      label->setBuddy(cb);

      cb->setValidator(new WValidator(cb));
      cb->validator()->setMandatory(true);

      cb->insertItem(0, ""); // empty value
      cb->insertItem(1, "Value 1");
      cb->insertItem(2, "Value 2");

      cb->setCurrentIndex(1);


Regards,
Marco

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to