Forgive this somewhat noob-ish question, but what's the difference in behavior between the GetStringSelection() and GetValue() functions on wxComboBox?
Does this vary by platform?
(I've RTFM'ed -- the documentation wasn't really clear. And I've delved into the source code a bit, but the actual implementation details seem to be buried a little deeper than I have time for right now. I'm asking mostly just to be cautious in case I'm setting myself up for a problem.)
I only have to compile for MS Windows and Mac OSX (cocoa) --- but if you know there's a difference for another OS, please post it here anyway since it will likely be helpful to another reader at some point.
Thanks!!
wxComboBox - difference between GetStringSelection() and GetValue()
Re: wxComboBox - difference between GetStringSelection() and GetValue()
For this particular control there is no difference. If you look at the class diagram for wxComboBox you see that it derives from wxTextEntry and wxItemContainerImmutable.
http://docs.wxwidgets.org/trunk/classwx_combo_box.html
wxTextEntry::GetValue() gets the current value of the text control.
wxItemContainerImmutable::GetStringSelection() gets the currently selected string.
For a wxComboBox these happen to be the same.
http://docs.wxwidgets.org/trunk/classwx_combo_box.html
wxTextEntry::GetValue() gets the current value of the text control.
wxItemContainerImmutable::GetStringSelection() gets the currently selected string.
For a wxComboBox these happen to be the same.
Use the source, Luke!