Generate frames programmatically

Hai :slight_smile:
I'm all new to wxPython so a lot of things I ask may sound a bit
strange. But for start I have decided to give myself a task, to create
an application that will do following:
Get display resolution, then check is aspect ratio 4:3 or 16:9.
generate a grid of 16:9 or 16:12 frames (speaking of I'm not sure do I
really need frames or some other objects)
make main background and all of those objects transparent and then get
them to randomly "flash" in random collors from full opaque to full
transparent. Now that's a pretty useless application, but it came to
my mind and I've decided to do ti as a practice.
Now, what I'd like to know is following:
1. do I really need bunch of frames as objects, or can it be done
using some other widget ?
2. if so how to programmatically generate 16x9 or 16x12 of them.
Determining coordinates won't be problem, but:
2a. I was thinking of storing names in a list or dict. If I do so,
would I be able to access them in a list[1] way ?

Hope I was clear :slight_smile:
thanx in advance,
ch1zra

Hai :slight_smile:
I'm all new to wxPython so a lot of things I ask may sound a bit
strange. But for start I have decided to give myself a task, to create
an application that will do following:
Get display resolution, then check is aspect ratio 4:3 or 16:9.
generate a grid of 16:9 or 16:12 frames (speaking of I'm not sure do I
really need frames or some other objects)
make main background and all of those objects transparent and then get
them to randomly "flash" in random collors from full opaque to full
transparent. Now that's a pretty useless application, but it came to
my mind and I've decided to do ti as a practice.
Now, what I'd like to know is following:
1. do I really need bunch of frames as objects, or can it be done
using some other widget ?

If I understand correctly what you want to do, then yes, frames are the answer. If you want them to show the desktop and/or other background windows when you make them transparent, then they need to be top-level windows themselves. Using a frame with style=0 (so there are no borders or caption bars) would be the way to go.

2. if so how to programmatically generate 16x9 or 16x12 of them.

With a set of nested for loops.

Determining coordinates won't be problem, but:
2a. I was thinking of storing names in a list or dict. If I do so,
would I be able to access them in a list[1] way ?

There is nothing special about frame objects in this context. They can be added to a list or any other object collection type just like any other python object.

ยทยทยท

On 3/5/12 1:59 PM, ch1zra wrote:

--
Robin Dunn
Software Craftsman