Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Bug on DropList?
Bug on DropList? [message #20672] |
Tue, 31 March 2009 12:53 |
JoseB
Messages: 37 Registered: March 2009
|
Member |
|
|
drpList.Add("1-First");
drpList.Add("2-Second");
drpList.Add("3-Third");
drpList.Add("4-Fourth");
...
String strTemp = AsString(drpList.GetValue());
PromptOK("You selected: " + strTemp);
It works well.
drpList.Add( AttrText("1-First").Ink(Yellow));
drpList.Add( AttrText("2-Second").Ink(Yellow));
drpList.Add( AttrText("3-Third").Ink(Yellow));
drpList.Add( AttrText("4-Fourth").Ink(Yellow));
...
String strTemp = AsString(drpList.GetValue());
PromptOK("You selected: " + strTemp);
Gives an Exception...
Thanks
Jose
[Updated on: Tue, 31 March 2009 12:53] Report message to a moderator
|
|
|
Re: Bug on DropList? [message #20675 is a reply to message #20672] |
Tue, 31 March 2009 13:04 |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
I agree it would be nice if that worked, but Value doesn't intrinsically support AttrText so it requires manual conversion:
String s = ValueTo<AttrText>(~list).text; or wrap it in a function.
I think AttrText is intended to be used as a quick way of customizing text that isn't going to be read-back by the application. But I'm suprised it doesn't at least have a Value contructor (AttrText(const Value &v)).
|
|
|
Goto Forum:
Current Time: Fri Sep 20 23:28:35 CEST 2024
Total time taken to generate the page: 0.02205 seconds
|