943,545 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 2137
  • Python RSS
Oct 30th, 2008
0

WX.ID - Anywhere to get list?

Expand Post »
I'm just asking for anyone who knows anywhere to get list of inbuilt wx.ID like wx.ID_CLOSE etc (HTML/PDF), because I dont want to use Id while there is built one. Also can I use menu simiral to something like GetId() Method??
Thanks
Similar Threads
Reputation Points: 462
Solved Threads: 392
Senior Poster
evstevemd is offline Offline
3,681 posts
since Jun 2007
Oct 30th, 2008
0

Re: WX.ID - Anywhere to get list?

python Syntax (Toggle Plain Text)
  1. import wx
  2.  
  3. dir(wx)
Will give you all the attributes, functions, etc. of wx. And if you use the re module or a custom search you can filter out everything that starts with ID_

There's also the documentation

I don't understand your second question...
Last edited by jlm699; Oct 30th, 2008 at 5:49 pm.
Reputation Points: 355
Solved Threads: 292
Veteran Poster
jlm699 is offline Offline
1,102 posts
since Jul 2008
Oct 30th, 2008
0

Re: WX.ID - Anywhere to get list?

python Syntax (Toggle Plain Text)
  1. import wx
  2.  
  3. x = dir(wx)
  4.  
  5. for y in x:
  6. if y.find('ID_')!=-1:
  7. print y

output:

Python Syntax (Toggle Plain Text)
  1. ID_ABORT
  2. ID_ABOUT
  3. ID_ADD
  4. ID_ANY
  5. ID_APPLY
  6. ID_BACKWARD
  7. ID_BOLD
  8. ID_CANCEL
  9. ID_CLEAR
  10. ID_CLOSE
  11. ID_CLOSE_ALL
  12. ID_CONTEXT_HELP
  13. ID_COPY
  14. ID_CUT
  15. ID_DEFAULT
  16. ID_DELETE
  17. ID_DOWN
  18. ID_DUPLICATE
  19. ID_EDIT
  20. ID_EXIT
  21. ID_FILE
  22. ID_FILE1
  23. ID_FILE2
  24. ID_FILE3
  25. ID_FILE4
  26. ID_FILE5
  27. ID_FILE6
  28. ID_FILE7
  29. ID_FILE8
  30. ID_FILE9
  31. ID_FIND
  32. ID_FORWARD
  33. ID_HELP
  34. ID_HELP_COMMANDS
  35. ID_HELP_CONTENTS
  36. ID_HELP_CONTEXT
  37. ID_HELP_INDEX
  38. ID_HELP_PROCEDURES
  39. ID_HELP_SEARCH
  40. ID_HIGHEST
  41. ID_HOME
  42. ID_IGNORE
  43. ID_INDENT
  44. ID_INDEX
  45. ID_ITALIC
  46. ID_JUSTIFY_CENTER
  47. ID_JUSTIFY_FILL
  48. ID_JUSTIFY_LEFT
  49. ID_JUSTIFY_RIGHT
  50. ID_LOWEST
  51. ID_MORE
  52. ID_NEW
  53. ID_NO
  54. ID_NONE
  55. ID_NOTOALL
  56. ID_OK
  57. ID_OPEN
  58. ID_PAGE_SETUP
  59. ID_PASTE
  60. ID_PREFERENCES
  61. ID_PREVIEW
  62. ID_PREVIEW_CLOSE
  63. ID_PREVIEW_FIRST
  64. ID_PREVIEW_GOTO
  65. ID_PREVIEW_LAST
  66. ID_PREVIEW_NEXT
  67. ID_PREVIEW_PREVIOUS
  68. ID_PREVIEW_PRINT
  69. ID_PREVIEW_ZOOM
  70. ID_PRINT
  71. ID_PRINT_SETUP
  72. ID_PROPERTIES
  73. ID_REDO
  74. ID_REFRESH
  75. ID_REMOVE
  76. ID_REPLACE
  77. ID_REPLACE_ALL
  78. ID_RESET
  79. ID_RETRY
  80. ID_REVERT
  81. ID_REVERT_TO_SAVED
  82. ID_SAVE
  83. ID_SAVEAS
  84. ID_SELECTALL
  85. ID_SEPARATOR
  86. ID_SETUP
  87. ID_STATIC
  88. ID_STOP
  89. ID_UNDELETE
  90. ID_UNDERLINE
  91. ID_UNDO
  92. ID_UNINDENT
  93. ID_UP
  94. ID_VIEW_DETAILS
  95. ID_VIEW_LARGEICONS
  96. ID_VIEW_LIST
  97. ID_VIEW_SMALLICONS
  98. ID_VIEW_SORTDATE
  99. ID_VIEW_SORTNAME
  100. ID_VIEW_SORTSIZE
  101. ID_VIEW_SORTTYPE
  102. ID_YES
  103. ID_YESTOALL
  104. ID_ZOOM_100
  105. ID_ZOOM_FIT
  106. ID_ZOOM_IN
  107. ID_ZOOM_OUT

And yeah, what is your second question asking?
Last edited by tyincali; Oct 30th, 2008 at 6:02 pm.
Reputation Points: 31
Solved Threads: 7
Light Poster
tyincali is offline Offline
45 posts
since Oct 2008
Oct 30th, 2008
0

Re: WX.ID - Anywhere to get list?

Great script, thaks all,
Dont Worry jlm699 about the second question
Reputation Points: 462
Solved Threads: 392
Senior Poster
evstevemd is offline Offline
3,681 posts
since Jun 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: C to Python Translation anyone?
Next Thread in Python Forum Timeline: How do I get the current widget in focus without changing focus?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC