Hi,
posting some minimal, self-contained code and pointing out the
problems or not-working parts would be appropriate in order to get
more specific suggestions;
in general, you would use a function like
def display_combo_value(evt):
output_text_field.AppendText(value_selector.GetValue())
evt.Skip()
which is bound to handle mouse clicks on a given button via:
submit_button.Bind(wx.EVT_BUTTON, display_combo_value)
of course the respective widgets must available, e.g.:
value_selector = wx.ComboBox(parent_panel, -1, u"option 3", (-1, -1),
(-1, -1), [u"option 1", u"option 2", u"option 3", u"option 4",],
style=wx.CB_DROPDOWN)
submit_button = wx.Button(parent_panel, -1, u"append selected option")
output_text_field = wx.TextCtrl(parent_panel, -1,
style=wx.TE_MULTILINE | wx.TE_RICH2)
etc.
The actual referencing would probably be more complex - e.g. including
"self" or the appropriate class instance names, if they are used etc.
hth,
vbr
···
2013/2/2 Marin Doko <marindoko92@gmail.com>:
Hi people.
So, I have a combobox with several choices, a button called "Print" and a
textctrl part of frame.
When user choose something from combobox, then press the button "Print",
text part gets appended with something.
If someone wants to see and help, I will send part of code where I got
stuck.
I'm very new at this, so sorry if I didn't explained things good--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.