Searching for unique graphic control/drawing

Hi All,

I want to create a graphical view of events profiling. i have an example attached as zip file.

In general, it is a list of recorded events, each event is then draw on the application in the correct place in the frame (the frame is something logic in the range of 0-5000, devided to 8 equal slots and the event can start at time 2000 and end at time 2037 etc) it should look like this:

Evt x | | | | | | | | |

0 1 2 3 4 5 6 7 8

within the slots, i want to have lines in different thicness which will start/end at the correct place.

Any suggestions?

Thanks,

Roy.

reporter.rar (34.2 KB)

I think you have a couple of options that might work. Drawing on a DC
is pretty easy. My first ever wxPython project was an implementation
of Conway's Life, drawing the grid and drawing the cells and getting
them to look right was no problem whatsoever.

You might want to start with a single column grid on the left and then
draw out horizontally based on that. Heck it might even be possible to
completely leverage a wx.Grid into what you are looking for.

···

On Mon, Aug 4, 2008 at 12:31 AM, roy zinn <roy.zinn@gmail.com> wrote:

Hi All,

I want to create a graphical view of events profiling. i have an example
attached as zip file.

In general, it is a list of recorded events, each event is then draw on the
application in the correct place in the frame (the frame is something logic
in the range of 0-5000, devided to 8 equal slots and the event can start at
time 2000 and end at time 2037 etc) it should look like this:

Evt x | | | | | |
> > >
             0 1 2 3 4 5
6 7 8

within the slots, i want to have lines in different thicness which will
start/end at the correct place.

Any suggestions?

Thanks,
Roy.
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
Stand Fast,
tjg. [Timothy Grant]

roy zinn wrote:

I want to create a graphical view of events profiling. i have an example attached as zip file.

No, it was not a zip file. It was a "rar" file. Not as friendly.

In general, it is a list of recorded events, each event is then draw on the application in the correct place in the frame (the frame is something logic in the range of 0-5000, devided to 8 equal slots and the event can start at time 2000 and end at time 2037 etc) it should look like this:
Evt x | | | | | > > > > 0 1 2 3 4 5 6 7 8
within the slots, i want to have lines in different thicness which will start/end at the correct place.

I don't understand what you are asking. The screenshot you attached looks like it is working. Is that mock-up? Or was that a screenshot from an application that you are trying to copy?

The task is just not that hard. It's all a matter of scaling. If the width of the chart region is 800 pixels, and the window has to cover 10 hours (600 minutes), then minute #m starts at pixel m * 800 / 600. Just add a little check to make sure each line segment is at least 1 pixel wide, and you've got it.

There is no built-in control to do this. You'll want to do the drawing in an EVT_PAINT handler.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.