RE: [wxPython] Re: Advanced use of wxHtmlWindow ( and SetId )

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: [wxPython] Re: Advanced use of wxHtmlWindow ( and SetId )

Cavanaugh, Craig
Is there anyway to generate custom ID's ( ID_RECORD = wxNewId() ) and use
them?

I'm trying to avoid using a format string like the About.py example does
because the list of controls is going to be lengthy and hard to manage, but
I get errors from the tag handler when I use my own ID's.  I've made sure
the ID's are created before the import of wxPython.lib.wxpTag, but that
still doesn't help.

Craig

> -----Original Message-----
> From: Chris Fama [SMTP:[hidden email]]
> Sent: Tuesday, March 07, 2000 10:15 PM
> To: [hidden email]
> Subject: [wxPython] Re:  Advanced use of wxHtmlWindow
>
> I use code like
>
>         EVT_BUTTON(self.FindWindowById(wxID_SAVE),
>                    wxID_SAVE,
>                    self.OnSaveMail)
>
> I  hope this reply is not too late!
>
> Chris
>
>
> _______________________________________________
> wxPython-users maillist  -  [hidden email]
> http://starship.python.net/mailman/listinfo/wxpython-users

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Re: Advanced use of wxHtmlWindow ( and SetId )

Robin Dunn

> Is there anyway to generate custom ID's ( ID_RECORD = wxNewId() ) and use
> them?
>
> I'm trying to avoid using a format string like the About.py example does
> because the list of controls is going to be lengthy and hard to manage, but
> I get errors from the tag handler when I use my own ID's.  I've made sure
> the ID's are created before the import of wxPython.lib.wxpTag, but that
> still doesn't help.
>

Are you using the module="modulename" attribute of the WXP tag?  If so you
can put your identifiers in that module and then anything assigned to id that
can't be converted to an integer will be looked up in that module.  Class
names and such will also use this module so if you need to use the stock
classes make sure that the module does a "from wxPython.wx import *"

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users