Listings of flag/style etc. argument constants?

What’s the best source for looking up possibles/listings of the various constant values to be combined as argument values, etc., like wx.HORIZONTAL, wx.T_MULTILINE, etc. etc. to ‘quote’ two different examples, etc.?

As in would like to find a sort of collection of categories/possibilities/values for things like this, preferably organised/arranged in such a way as to make sense when reviewing them, or when looking for possibles in a specific situation/environment…?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

Hi Jacob,

···

On Monday, January 6, 2014 12:06:22 PM UTC-6, Jacob Kruger wrote:

What’s the best source for looking up possibles/listings of the various constant values to be combined as argument values, etc., like wx.HORIZONTAL, wx.T_MULTILINE, etc. etc. to ‘quote’ two different examples, etc.?

As in would like to find a sort of collection of categories/possibilities/values for things like this, preferably organised/arranged in such a way as to make sense when reviewing them, or when looking for possibles in a specific situation/environment…?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

I think my favorite way to look up styles is via a neat little app called the “Windows Styles and Events Hunter”, which can be found attached to the following thread:

https://groups.google.com/forum/#!topic/wxPython-dev/fBlHe7ytTvQ

I’m not sure if it was ever included with wxPython or not.

Mike

Ok, Mike, ran it, and after using mouse cursor to, for example, find Frame item on treeview - using normal cursor keys doesn’t want to navigate treeview/read it to me, if I double click on Frame, it ‘populates’ a file called eventsInStyle.pkl, so will have a look at the source code, and maybe play around with reverse pickling to see what it’s storing in there…

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

···

----- Original Message -----

From:
Mike Driscoll

To: wxpython-users@googlegroups.com

Cc: jacob@blindza.co.za

Sent: Monday, January 06, 2014 10:11 PM

Subject: [wxPython-users] Re: Listings of flag/style etc. argument constants?

Hi Jacob,

On Monday, January 6, 2014 12:06:22 PM UTC-6, Jacob Kruger wrote:

What's the best source for looking up possibles/listings of the various constant values to be combined as argument values, etc., like wx.HORIZONTAL, wx.T_MULTILINE, etc. etc. to 'quote' two different examples, etc.?
As in would like to find a sort of collection of categories/possibilities/    values for things like this, preferably organised/arranged in such a way as to make sense when reviewing them, or when looking for possibles in a specific situation/environment..?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

I think my favorite way to look up styles is via a neat little app called the “Windows Styles and Events Hunter”, which can be found attached to the following thread:

Redirecting to Google Groups

I’m not sure if it was ever included with wxPython or not.

Mike


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

would
be the wxPython Phoenix documentation.
Werner

···

Hi,

  On 06/01/2014 19:06, Jacob Kruger wrote:
      What's the best source for

looking up possibles/listings of the various constant values
to be combined as argument values, etc., like wx.HORIZONTAL,
wx.T_MULTILINE, etc. etc. to ‘quote’ two different examples,
etc.?

Another source

http://wxpython.org/Phoenix/docs/html/index.html

Hi Mike and Andrea;-) ,

...

I think my favorite way to look up styles is via a neat little app called the "Windows Styles and Events Hunter", which can be found attached to the following thread:

Redirecting to Google Groups

Totally forgot about that one:-) , so downloaded it but it doesn't quit work for me either.

When I run it against wxPython 2.9.5 or 2.8.12 I get the listing of the widgets and when I double click it goes out to the internet but when it comes back it doesn't list the events or styles.

Any idea what I am doing wrong?

Werner

P.S.
Noted that it used wx.aui and as I am doing a bit of Phoenix work I started adapting it to Phoenix but a non valid keyword 'id' on this in SendEventSize:
         if 'phoenix' in wx.PlatformInfo:
             sizeEvent = wx.SizeEvent(id=self.GetId())
         else:
             sizeEvent = wx.SizeEvent(winid=self.GetId())-- Niderenweg 6 CH-9043 Trogen Tel: +41 71 340 06 30 Mob: +41 76 374 81 07

···

On 06/01/2014 21:11, Mike Driscoll wrote:

Yeah, the EventsInStyle miniapp by Andrea is a good place to start.
It pickles the downloaded info from the internet.

It doesn’t handle everything tho and is a bit out of date for some of the newer stuff.
I’ve tinkered with it a bit for phoenix but am nowhere near completion with it.

But if you are building lists for particular modules or widgets maybe based on similar Constants,…

…try something like this for the various modules.(wx, wx.lib.agw, wx.stc, etc…)

for styleBit in dir(wx):
if styleBit.isupper():
print(styleBit)

Adapt the module being dir’d and for example if I was looking for listing all TextCtrl specific stuff,
I would do something like…

if styleBit.startswith(‘TE_’):

The PyShell/Crust/Etc works great for this as it has autocomplete to help with this also and you can send/write all found stuff to a txtFile/TextCtrl if you want.

The Phoenix docs are getting more complete now and has most stuff that has been written in the module docs.

I recall Mike Driscoll has a small miniapp that shows how to print out the events being fired off somewhere on his blog(Mouse vs. Python) also that might help with this.

Getting the lists isn’t too hard. Sorting them out takes some time and reference tho.

wxFormBuilder App has alot of these constants for the basic widgets listed in PropertyGrids that may help you out also.

Hi Werner,

Hi Mike and Andrea;-) ,

I think my favorite way to look up styles is via a neat little app
called the “Windows Styles and Events Hunter”, which can be found
attached to the following thread:

https://groups.google.com/forum/#!topic/wxPython-dev/fBlHe7ytTvQ

Totally forgot about that one:-) , so downloaded it but it doesn’t quit
work for me either.

When I run it against wxPython 2.9.5 or 2.8.12 I get the listing of the
widgets and when I double click it goes out to the internet but when it
comes back it doesn’t list the events or styles.

Any idea what I am doing wrong?

Werner

P.S.

Noted that it used wx.aui and as I am doing a bit of Phoenix work I
started adapting it to Phoenix but a non valid keyword ‘id’ on this in
SendEventSize:

     if 'phoenix' in wx.PlatformInfo:

         sizeEvent = wx.SizeEvent(id=self.GetId())

     else:

         sizeEvent = wx.SizeEvent(winid=self.GetId())-- Niderenweg 6

Yes, it appears to be broken right now. Not sure if the docs it pointed to are no longer there or what, but it fails when I run it with wx 2.9 with the following traceback when I click on items:

Traceback (most recent call last):
File “c:\Python27\lib\site-packages\wx-2.9.4-msw\wx_core.py”, line 16776, in
lambda event: event.callable(*event.args, **event.kw) )
File “EventsInStyle.py”, line 946, in LoadData
True, img1)
File “c:\Python27\lib\site-packages\wx-2.9.4-msw\wx_core.py”, line 13632, in
return core.BookCtrlBase_AddPage(*args, **kwargs)
TypeError: in method ‘BookCtrlBase_AddPage’, expected argument 5 of type ‘int’

On wx 2.8, it “updates”, but displays nothing.

  • Mike
···

On Tuesday, January 7, 2014 2:43:06 AM UTC-6, werner wrote:

On 06/01/2014 21:11, Mike Driscoll wrote:

Sorry Jacob…but it appears it broke since the last time I used it. Hopefully someone (like Andrea) will come along and fix it. But the docs that Werner mentioned should work pretty well too, although you sometimes have to dig in them to get the information.

Mike

···

On Monday, January 6, 2014 11:35:25 PM UTC-6, Jacob Kruger wrote:

Ok, Mike, ran it, and after using mouse cursor to, for example, find Frame item on treeview - using normal cursor keys doesn’t want to navigate treeview/read it to me, if I double click on Frame, it ‘populates’ a file called eventsInStyle.pkl, so will have a look at the source code, and maybe play around with reverse pickling to see what it’s storing in there…

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

----- Original Message -----

From:
Mike Driscoll

To: wxpytho...@googlegroups.com

Cc: ja…@blindza.co.za

Sent: Monday, January 06, 2014 10:11 PM

Subject: [wxPython-users] Re: Listings of flag/style etc. argument constants?

Hi Jacob,

On Monday, January 6, 2014 12:06:22 PM UTC-6, Jacob Kruger wrote:

What's the best source for looking up possibles/listings of the various constant values to be combined as argument values, etc., like wx.HORIZONTAL, wx.T_MULTILINE, etc. etc. to 'quote' two different examples, etc.?
As in would like to find a sort of collection of categories/possibilities/    values for things like this, preferably organised/arranged in such a way as to make sense when reviewing them, or when looking for possibles in a specific situation/environment..?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

I think my favorite way to look up styles is via a neat little app called the “Windows Styles and Events Hunter”, which can be found attached to the following thread:

https://groups.google.com/forum/#!topic/wxPython-dev/fBlHe7ytTvQ

I’m not sure if it was ever included with wxPython or not.

Mike


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ok, that should help/work - here’s a bit of a test mod:

import wx
for styleBit in dir(wx):
if styleBit.isupper() and styleBit[:3]==“TE_”:
print(styleBit)

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

···

----- Original Message -----

From:
Metallicow

To: wxpython-users@googlegroups.com

Sent: Tuesday, January 07, 2014 04:13 PM

Subject: Re: [wxPython-users] Re: Listings of flag/style etc. argument constants?

Yeah, the EventsInStyle miniapp by Andrea is a good place to start.
It pickles the downloaded info from the internet.

It doesn’t handle everything tho and is a bit out of date for some of the newer stuff.
I’ve tinkered with it a bit for phoenix but am nowhere near completion with it.

But if you are building lists for particular modules or widgets maybe based on similar Constants,…

…try something like this for the various modules.(wx, wx.lib.agw, wx.stc, etc…)

for styleBit in dir(wx):
    if styleBit.isupper():
        print(styleBit)

Adapt the module being dir’d and for example if I was looking for listing all TextCtrl specific stuff,
I would do something like…

if styleBit.startswith('TE_'):

The PyShell/Crust/Etc works great for this as it has autocomplete to help with this also and you can send/write all found stuff to a txtFile/TextCtrl if you want.

The Phoenix docs are getting more complete now and has most stuff that has been written in the module docs.

I recall Mike Driscoll has a small miniapp that shows how to print out the events being fired off somewhere on his blog(Mouse vs. Python) also that might help with this.

Getting the lists isn’t too hard. Sorting them out takes some time and reference tho.

wxFormBuilder App has alot of these constants for the basic widgets listed in PropertyGrids that may help you out also.


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks.

Most likely, like guys said something like compatibility issues, or something.

See it was pickling empty dicts/lists anyway - no data, but, the other idea metallico came up with might also be a starting point for now anyway.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

···

----- Original Message -----

From:
Mike Driscoll

To: wxpython-users@googlegroups.com

Cc: jacob@blindza.co.za

Sent: Tuesday, January 07, 2014 04:31 PM

Subject: Re: [wxPython-users] Re: Listings of flag/style etc. argument constants?

Sorry Jacob…but it appears it broke since the last time I used it. Hopefully someone (like Andrea) will come along and fix it. But the docs that Werner mentioned should work pretty well too, although you sometimes have to dig in them to get the information.

Mike

On Monday, January 6, 2014 11:35:25 PM UTC-6, Jacob Kruger wrote:

Ok, Mike, ran it, and after using mouse cursor to, for example, find Frame item on treeview - using normal cursor keys doesn't want to navigate treeview/read it to me, if I double click on Frame, it 'populates' a file called eventsInStyle.pkl, so will have a look at the source code, and maybe play around with reverse pickling to see what it's storing in there...<smile>

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

----- Original Message -----

From: Mike Driscoll

To: wxpytho...@googlegroups.com

Cc: ja…@blindza.co.za

Sent: Monday, January 06, 2014 10:11 PM

Subject: [wxPython-users] Re: Listings of flag/style etc. argument constants?

Hi Jacob,

  On Monday, January 6, 2014 12:06:22 PM UTC-6, Jacob Kruger wrote:
    What's the best source for looking up possibles/listings of the various constant values to be combined as argument values, etc., like wx.HORIZONTAL, wx.T_MULTILINE, etc. etc. to 'quote' two different examples, etc.?
    As in would like to find a sort of collection of categories/possibilities/        values for things like this, preferably organised/arranged in such a way as to make sense when reviewing them, or when looking for possibles in a specific situation/environment..?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

  I think my favorite way to look up styles is via a neat little app called the "Windows Styles and Events Hunter", which can be found attached to the following thread:

https://groups.google.com/forum/#!topic/wxPython-dev/fBlHe7ytTvQ

  I'm not sure if it was ever included with wxPython or not.

Mike


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Mike,

...

Yes, it appears to be broken right now. Not sure if the docs it pointed to are no longer there or what, but it fails when I run it with wx 2.9 with the following traceback when I click on items:

O.k. the docs source is 'wxWidgets: Documentation’ which uses a very different format since 2.9 when wxWidgets switched to Doxygen.

I looked at how it reads the doc pages but don't understand how it is supposed to work.

At this point it would probably make more sense to base it on the Phoenix doc as the wxPython team has control over its format.

I had a go at changing it to use the Phoenix doc, it is a bit crude, especially in 'FindWindoStyles', but a start.

Just tested with Phoenix (see wxVersion.select at the beginning) will try and test against 2.9.5/3.0 classic tomorrow.

Werner

EventsInStyle.py (40.8 KB)

···

On 07/01/2014 15:29, Mike Driscoll wrote:

Whatever you did worked for me…and I tried it with 2.9.4. I don’t have 3.0 installed yet. Something that needs to be added is some kind of message when there are no items…like for wx.App. Anyway, good job!

  • Mike
···

On Tuesday, January 7, 2014 9:43:42 AM UTC-6, werner wrote:

Hi Mike,

On 07/01/2014 15:29, Mike Driscoll wrote:

Yes, it appears to be broken right now. Not sure if the docs it
pointed to are no longer there or what, but it fails when I run it
with wx 2.9 with the following traceback when I click on items:

O.k. the docs source is ‘http://docs.wxwidgets.org/trunk’ which uses a
very different format since 2.9 when wxWidgets switched to Doxygen.

I looked at how it reads the doc pages but don’t understand how it is
supposed to work.

At this point it would probably make more sense to base it on the
Phoenix doc as the wxPython team has control over its format.

I had a go at changing it to use the Phoenix doc, it is a bit crude,
especially in ‘FindWindoStyles’, but a start.

Just tested with Phoenix (see wxVersion.select at the beginning) will
try and test against 2.9.5/3.0 classic tomorrow.

Werner

Hi Werner,

Hi Mike,

Yes, it appears to be broken right now. Not sure if the docs it pointed to are no longer there or what, but it fails when I run it with wx 2.9 with the following traceback when I click on items:

O.k. the docs source is ‘http://docs.wxwidgets.org/trunk’ which uses a very different format since 2.9 when wxWidgets switched to Doxygen.

I looked at how it reads the doc pages but don’t understand how it is supposed to work.

At this point it would probably make more sense to base it on the Phoenix doc as the wxPython team has control over its format.

I perfectly agree with you here. The wxWidgets doc format changes at every release of Doxygen, so let’s drop it.

The only issue I see is that it will be complicated to make EventsInStyle compatible with Classic and Phoenix at the same time - the package-classes relationships are too different (think how many widgets are now in wx.adv in Phoenix that were in the wx namespace before.

I had a go at changing it to use the Phoenix doc, it is a bit crude, especially in ‘FindWindoStyles’, but a start.

Just tested with Phoenix (see wxVersion.select at the beginning) will try and test against 2.9.5/3.0 classic tomorrow.

Please let me know when/if you want me to take a look at it, we can build on each other’s work and I’ll have some time tomorrow.

···

Il giorno martedì 7 gennaio 2014, Werner ha scritto:

On 07/01/2014 15:29, Mike Driscoll wrote:

Werner

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

I tend to like one liners when using the shell, so I use:

print "\n".join([x for x in dir(wx) if x.startswith("TE_")]

···

On 1/7/2014 10:27 AM, Jacob Kruger wrote:

Ok, that should help/work - here's a bit of a test mod:
import wx
for styleBit in dir(wx):
  if styleBit.isupper() and styleBit[:3]=="TE_":
    print(styleBit)
Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

The only issue I see is that it will be complicated to make EventsInStyle compatible with Classic and Phoenix at the same time - the package-classes relationships are too different (think how many widgets are now in wx.adv in Phoenix that were in the wx namespace before.

Please let me know when/if you want me to take a look at it, we can build on each other's work and I'll have some time tomorrow.

Yes, It would be nice if you updated it for Phoenix. :slight_smile:

Here is my basic start at hacking it up for Phoenix.
I think I got around to the changing the urls and changing some of the namespaces to try snaking the infos.
As I said it isn’t anywhere near finished. Maybe this will help a bit in conversion.
The wxversion.select may need changed to reflect your phoenix install.

EventsInStyle_pnxHack.py (46.4 KB)

···

On Tuesday, January 7, 2014 10:35:59 AM UTC-6, Infinity77 wrote:

Ok, if I now sort of double click on some of the treeview items, it does populate the sort of top level dict items, but, with no data under those items - am I meant to select them and then click on something else thereafter?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

···

----- Original Message -----

From:
Mike Driscoll

To: wxpython-users@googlegroups.com

Sent: Tuesday, January 07, 2014 05:51 PM

Subject: Re: [wxPython-users] Re: Listings of flag/style etc. argument constants?

On Tuesday, January 7, 2014 9:43:42 AM UTC-6, werner wrote:

Hi Mike,

On 07/01/2014 15:29, Mike Driscoll wrote:

> Yes, it appears to be broken right now. Not sure if the docs it
> pointed to are no longer there or what, but it fails when I run it
> with wx 2.9 with the following traceback when I click on items:
>
O.k. the docs source is 'http://docs.wxwidgets.org/trunk ’ which uses a
very different format since 2.9 when wxWidgets switched to Doxygen.

I looked at how it reads the doc pages but don't understand how it is

supposed to work.

At this point it would probably make more sense to base it on the
Phoenix doc as the wxPython team has control over its format.

I had a go at changing it to use the Phoenix doc, it is a bit crude,
especially in 'FindWindoStyles', but a start.

Just tested with Phoenix (see wxVersion.select at the beginning) will

try and test against 2.9.5/3.0 classic tomorrow.

Werner

Whatever you did worked for me…and I tried it with 2.9.4. I don’t have 3.0 installed yet. Something that needs to be added is some kind of message when there are no items…like for wx.App. Anyway, good job!

  • Mike


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Um, I recall after a item downloaded the GUI needed refreshed, so, umm yea I think so. Double click on an item then the notebook should refresh with infos.
Note: The updated attached samples for phoenix still need quite a bit of work and may not work quite right just yet.
Basically the attached samples are for Andrea/whoever wants to help attempt updating EventsInStyle to Phoenix.

If you have your hands on the original, Use wxversion.select(‘2.8’). The original only misses the searchctrl IIRC, but is missing the newer widgets.
The refresh doesn’t work quite right tho, so you may have to switch back and forth once after downloading an item.
This attachment is the original with all the downloaded infos in pkl. (Uses wx2.8)

EventsInStyle_Orig_with_pkl.7z (39 KB)

···

On Tuesday, January 7, 2014 1:00:54 PM UTC-6, Jacob Kruger wrote:

Ok, if I now sort of double click on some of the treeview items, it does populate the sort of top level dict items, but, with no data under those items - am I meant to select them and then click on something else thereafter?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
‘…fate had broken his body, but not his spirit…’

Hi Andrea and others,

I moved this to a new thread.

I won't do anything on it for a few days, have to deal with some Swiss administrative stuff.

I started to try to stay compatible with classic and Phoenix, i.e. have a separate widget list, but I don't think this will work as the wxPython doc is based on Phoenix.

Anyhow, at this point I think that we should just go forward and get it to work fully against the Phoenix documentation but allow to run it on e.g. 2.9.5+ classic and Phoenix.

Werner

Hi Jacob,

···

On 07/01/2014 20:00, Jacob Kruger wrote:

Ok, if I now sort of double click on some of the treeview items, it does populate the sort of top level dict items, but, with no data under those items - am I meant to select them and then click on something else thereafter?

When double clicking e.g. "Button" you should have the events/styles listed on the right.

What version of wxPython are you using?

Werner

Hi Werner,

···

Hi Andrea and others,

I moved this to a new thread.

I won’t do anything on it for a few days, have to deal with some Swiss administrative stuff.

I started to try to stay compatible with classic and Phoenix, i.e. have a separate widget list, but I don’t think this will work as the wxPython doc is based on Phoenix.

Anyhow, at this point I think that we should just go forward and get it to work fully against the Phoenix documentation but allow to run it on e.g. 2.9.5+ classic and Phoenix.

I have made quite a few improvements this morning, and it’s almost ready to be used - but Phoenix-only. The only problem I see, is that you have patched a relatively old version while Metallicow used a “recent” one (which was my last modification to this tool). This “recent” version uses a wx.FlexGridSizer and ExpandoTextCtrl to list the styles and their description, and it paints the styles/events table as a grid.

Unfortunately, it calls wx.FlexGridSizer.GetRowHeights() and wx.FlexGridSizer.GetColWidths(), which are nowhere to be found in Phoenix - mostly because they have been left out from the wxWidgets docs and so the Phoenix wrapper generator can not find them.

Robin, is there a way to get these two methods back? Or they have been removed (but why?) from the wx.FlexGridSizer API by the wx-devs?

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://www.infinity77.net

-------------------------------------------------------------

def ask_mailing_list_support(email):

if mention_platform_and_version() and include_sample_app():
    send_message(email)
else:
    install_malware()
    erase_hard_drives()

-------------------------------------------------------------