https://bitbucket.org/driscollis/medialocker
In this we used validators to get data to/from database to controls.
Mike did a few posts on his blog about it.
http://www.blog.pythonlibrary.org/tag/medialocker/
If you just need something simpler then you could do something along
these lines.
with yourDialog(....) as dlg:
if dlg.ShowModal() == wx.ID_OK:
fn = dlg.firstName.GetValue()
....
Try to code as much as you can and come back with your questions. If
the code is not too large you can even attach it, if you do follows as
much as possible - http://wiki.wxpython.org/MakingSampleApps
Werner
On 18/03/2012 18:47, wxxxx wrote:
> Hello,
> what is the right way to do a pop-up dialog with multiple input fields
> (firstname, lastname, age) and get user data. As wxpython beginner I
> can't figure it out. Is there any example for it?
Maybe the sample app Mike and I did might help you.https://bitbucket.org/driscollis/medialocker
In this we used validators to get data to/from database to controls.
Mike did a few posts on his blog about it.
http://www.blog.pythonlibrary.org/tag/medialocker/
If you just need something simpler then you could do something along
these lines.with yourDialog(....) as dlg:
if dlg.ShowModal() == wx.ID_OK:
fn = dlg.firstName.GetValue()
....
On Sun, Mar 18, 2012 at 3:45 PM, wxxxx <fredga...@googlemail.com> wrote:
>
> On Sunday, March 18, 2012 7:19:40 PM UTC+1, werner wrote:
>>
>> On 18/03/2012 18:47, wxxxx wrote:
>> > Hello,
>> > what is the right way to do a pop-up dialog with multiple input fields
>> > (firstname, lastname, age) and get user data. As wxpython beginner I
>> > can't figure it out. Is there any example for it?
>> Maybe the sample app Mike and I did might help you.
>>
>> https://bitbucket.org/driscollis/medialocker
[...]
> thanks for quick reply. Medialocker is pretty big app for learning from it.
> Will do my best.
>
> Basically, I just want to know how to create dlg.firstName and dlg.lastName
> inputs for dlg. What objects should they be?
You're mixing up your terminology, I think. It sounds like you need
to start with something simpler.
Take a look at the examples at Zetcode. Maybe they'll help you get on
the right track.
http://zetcode.com/wxpython/dialogs/
>> Try to code as much as you can and come back with your questions. If
>> the code is not too large you can even attach it, if you do follows as
>> much as possible - http://wiki.wxpython.org/MakingSampleApps
That's good advice too.
>> Werner
HTH.
Cheers,
Scott.
On 18/03/2012 20:45, wxxxx wrote:
...
> thanks for quick reply. Medialocker is pretty big app for learning
> from it. Will do my best.
> Basically, I just want to know how to create dlg.firstName and
> dlg.lastName inputs for dlg. What objects should they be?
The wxPython demo is a good place to look for answers for this type of
question, check out wx.TextCtrl and wx.lib.masked.TextCtrl (search for
'masked' in the demo).
In the tutorial Scott pointed you too there is another one which might
be of interest to you:
http://zetcode.com/wxpython/databases/
Werner
Also the Dialog sample in the demo has a fairly good example of a simple
dialog with labels, textctrls and buttons. It also shows a few extra
things, but the golden nuggets are in there too.
--
Robin Dunn
Software Craftsman
http://wxPython.org
On 20/03/2012 19:35, Robin Dunn wrote:
...
> Also the Dialog sample in the demo has a fairly good example of a
> simple dialog with labels, textctrls and buttons. It also shows a few
> extra things, but the golden nuggets
Where are they hidden, didn't find them;-) .
Werner