Once I get a value from a texctrl can I assign it to a varible by simply
using: set.control.getvalue()=X ?
What would the proper syntax be.
acidblue writes:
Once I get a value from a texctrl can I assign it to a
varible by simply using: set.control.getvalue()=X ?
What would the proper syntax be.
# get the value from the textctrl into a variable:
value = textControl.GetValue()
# modify the contents of the variable:
value = value + " -- suffix"
# overwrite the textctrl's value with the value of the variable:
textControl.SetValue(value)
···
--
Paul
http://www.paulmcnett.com
Keep getting syntax error
Here's my code:
self.FlowerTimebox = wxMaskedTextCtrl(id=wxID_BLUE49FLOWERTIMEBOX,
name='FlowerTimebox', parent=self.panel1, pos=wxPoint(248,
80),
size=wxSize(24, 21), style=0, value='')
>>>> >>>>T = FlowerTimebox.GetValue()<<<<<<<<
self.FlowerTimebox.SetMask('XX')
self.FlowerTimebox.SetAutoformat('')
self.FlowerTimebox.SetDatestyle('MDY')
self.FlowerTimebox.SetFormatcodes('')
self.FlowerTimebox.SetDescription('')
self.FlowerTimebox.SetExcludeChars('')
self.FlowerTimebox.SetValidRegex('')
self.FlowerTimebox.SetConstraints(LayoutAnchors(self.FlowerTimebox,
True, True, False, False))
···
----- Original Message -----
From: "Paul McNett" <p@ulmcnett.com>
To: <wxPython-users@lists.wxwidgets.org>
Sent: Thursday, May 27, 2004 3:39 PM
Subject: Re: [wxPython-users] GetValue
acidblue writes:
> Once I get a value from a texctrl can I assign it to a
> varible by simply using: set.control.getvalue()=X ?
> What would the proper syntax be.# get the value from the textctrl into a variable:
value = textControl.GetValue()# modify the contents of the variable:
value = value + " -- suffix"# overwrite the textctrl's value with the value of the variable:
textControl.SetValue(value)--
Paul
http://www.paulmcnett.com---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
In Thursday, May 27, 2004, 7:52:09 PM, acidblue wrote:
Keep getting syntax error
Here's my code:
self.FlowerTimebox = wxMaskedTextCtrl(id=wxID_BLUE49FLOWERTIMEBOX,
name='FlowerTimebox', parent=self.panel1, pos=wxPoint(248,
80),
size=wxSize(24, 21), style=0, value='')
>>>>> >>>>T = FlowerTimebox.GetValue()<<<<<<<<
(...)
try this instead:
T = self.FlowerTimebox.GetValue()
-- tacao