Db App with login dialog as a no-parent object?
Sebastian Żurek
sebzur at pin.if.uz.zgora.pl
Wed Sep 20 14:06:25 PDT 2006
Don Dwiggins napisał(a):
> Uwe Hoffmann wrote:
>> Sebastian Żurek schrieb:
>>> I need a login dialog on startup as a first widget to
>>> communicate with user. After valid password and login the
>>> main frame pops-up and user is able to do something in the app.
>> I would create *and* destroy the dialog (no parent) within the OnInit
>> function of the wx.App . The mainframe will be created afterwards after
>> a succesfull call to the login dialog.
>>
>> regards
>>
>> Uwe
>
> That's essentially what I've done in one of my apps; it works fine. (I
> recommend wrapping the dialog in some error handling so you can give the
> user a useful message if the logon doesn't succeed, either through a bad
> password, database name misspelled, server not available, ....)
>
Thanks a lot Uwe and Don! I've created an orphan shaped frame (the
shaped size is a great feature of the wxWindows! Take a gander if you
have a second:
http://pin.if.uz.zgora.pl/~sebzur/download/login-shot.png) as a login
box, and I'm destroying it as soon, as the login is correct. I'm
catching exceptions also, so the user is getting full info in case of
any faults.
Everything works great!
Best regards,
Sebastian
More information about the wxpython-users
mailing list