dynamic sash windows

What I want to do is the following:
A horizontal box sizer is dynamically filled up with a row of "sash"
resizeable windows via plugins. Windows can be removed and added/inserted

I am not quite sure how to do it and would appreciate advice - the dynamic
sash example in the demo appears to have different aims

The most simple example that shows how to dynamically add a sash resizeable
window with just a button or a text control would be most welcome, even in
pseudo code, just pointing me in the right direction

Thanks,
Horst

Horst Herb wrote:

What I want to do is the following:
A horizontal box sizer is dynamically filled up with a row of "sash" resizeable windows via plugins. Windows can be removed and added/inserted

I am not quite sure how to do it and would appreciate advice - the dynamic sash example in the demo appears to have different aims

The most simple example that shows how to dynamically add a sash resizeable window with just a button or a text control would be most welcome, even in pseudo code, just pointing me in the right direction

I'm not quite sure I understand what you are looking for. Please give some more explaination, pictures, etc.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

See attached image. The row of little Windows on top is currently a box sizer,
which fills up sequentially and dynamically via plugins
This row can contain zero to many plugin windows
What I need is
1.) a sash (user resizeable border) on the right hand side (or bottom side if
vertically oriented) of each of these little plugin windows (where I drew the
red lines on the snapshot)
2.) to programmatically change the order of these plugin windows within that
row

Such row can be oriented vertically or horizontally

Ideally, something like:

class sashcontainer:

  def init(self, parent, ..., orientation=wx.HORIZONTAL)
    "creates an empty container window with the stated orientation - orientation
works like in a box sizer"

  def append(self, window, initialwidth=-1)
    "appends the window with the stated width and resizes all other contained
windows accordingly"

  def insert(self, window,width, position)
    as append, but inserts the window within the container at the stated
position

  def remove(self, position)
    removes the window from the container and resizes all contained windows
automatically to fill up the space

  def getWindowWidth(self, position)
    returns the current width of the contained window at stated position

  def setWindowWidth(self, position, width)
    sets the sash of the window at stated position to stated width

I offer US $100 bounty for an implementation of this or just a heartfelt
thanks for any hints how to do it best myself
If somebody wants to do it but reckons $100 is too small a bounty, let me know
- if this is more works than it appears to be, I am happy to increase the
bounty

The code can be added to wxPython stock under standard wxPython license for
all to enjoy because I believe I am not the only one wanting this

Horst

···

On Wed, 8 Jun 2005 19:53, Robin Dunn wrote:

> What I want to do is the following:
> A horizontal box sizer is dynamically filled up with a row of "sash"
> resizeable windows via plugins. Windows can be removed and added/inserted

I'm not quite sure I understand what you are looking for. Please give
some more explaination, pictures, etc.

Horst Herb wrote:

···

On Wed, 8 Jun 2005 19:53, Robin Dunn wrote:

What I want to do is the following:
A horizontal box sizer is dynamically filled up with a row of "sash"
resizeable windows via plugins. Windows can be removed and added/inserted

I'm not quite sure I understand what you are looking for. Please give
some more explaination, pictures, etc.

See attached image. The row of little Windows on top is currently a box sizer, which fills up sequentially and dynamically via plugins
This row can contain zero to many plugin windows
What I need is 1.) a sash (user resizeable border) on the right hand side (or bottom side if vertically oriented) of each of these little plugin windows (where I drew the red lines on the snapshot)
2.) to programmatically change the order of these plugin windows within that row

Such row can be oriented vertically or horizontally

You could do something like that with nested wx.SplitterWindows but the code would get pretty ugly pretty fast as you add more splits, and changing order would be difficult.

I'll think about this a bit more today, maybe something will develop.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

You could do something like that with nested wx.SplitterWindows but the

code would get pretty ugly pretty fast as you add more splits, and
changing order would be difficult.

I'll think about this a bit more today, maybe something will develop.

Ah... no way to win if Robin starts to work on this :frowning:

Andrea.

That was my approach initially and it *was* ugly

Horst

···

On Thu, 9 Jun 2005 18:04, Robin Dunn wrote:

You could do something like that with nested wx.SplitterWindows but the
code would get pretty ugly pretty fast as you add more splits, and
changing order would be difficult.

I just received a file from Ricardo Pedroso which appears to do what I want.
He will probably get the bounty, so everybody else please don't waste your
time right now until I have reviewed the code.

Next bounty will be $300 for a "time scheduler" widget, details on Monday

Cheers,
Horst

···

On Wed, 8 Jun 2005 15:03, Horst Herb wrote:

What I want to do is the following:
A horizontal box sizer is dynamically filled up with a row of "sash"
resizeable windows via plugins. Windows can be removed and added/inserted

One small request... please, pretty please, update the status of the bounty once you've reached a resolution.
if we use:
http://wiki.wxpython.org/index.cgi/TheBounties
it will become usefull if not.... it will be just a dead page like this one:
http://wiki.wxpython.org/index.cgi/RobinDunnFanClub
:wink:

Peter

···

On Fri, 10 Jun 2005 08:46:36 +0300, Horst Herb <subscriptions@gnumed.net> wrote:

On Wed, 8 Jun 2005 15:03, Horst Herb wrote:

What I want to do is the following:
A horizontal box sizer is dynamically filled up with a row of "sash"
resizeable windows via plugins. Windows can be removed and added/inserted

I just received a file from Ricardo Pedroso which appears to do what I want.
He will probably get the bounty, so everybody else please don't waste your
time right now until I have reviewed the code.

Next bounty will be $300 for a "time scheduler" widget, details on Monday

Cheers,
Horst

It's for this reason I suggest using an explicit free software bounty
tracking service, rather than a Wiki page.

    <URL:bounty-hacker.org;

Any reasons not to use this?

···

On 10-Jun-2005, Peter Damoc wrote:

One small request... please, pretty please, update the status of the
bounty once you've reached a resolution.

--
\ "There was a point to this story, but it has temporarily |
  `\ escaped the chronicler's mind." -- Douglas Adams |
_o__) |
Ben Finney <ben@benfinney.id.au>

Horst Herb wrote:

What I want to do is the following:
A horizontal box sizer is dynamically filled up with a row of "sash"
resizeable windows via plugins. Windows can be removed and added/inserted

I just received a file from Ricardo Pedroso which appears to do what I want. He will probably get the bounty, so everybody else please don't waste your time right now until I have reviewed the code.

I already had this started so I thought I'd finish it up today. It is modeled after the wx.SplitterWindow, and also uses some of the same events and styles. It uses the newly wrapped wx.RendererNative to draw the sash in a platform specific way, but it gracefully falls back to a generic sash for the current releases of wxPython that don't have wx.RendererNative yet. It still has a couple rough edges but seems to work well otherwise.

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/wx/lib/splitter.py
http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/demo/MultiSplitterWindow.py

http://alldunn.com/wxPython/stuff/multisplitter-snapshot1.png
http://alldunn.com/wxPython/stuff/multisplitter-snapshot2.png

···

On Wed, 8 Jun 2005 15:03, Horst Herb wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

I already had this started so I thought I'd finish it up today. It is

modeled after the wx.SplitterWindow, and also uses some of the same
events and styles. It uses the newly wrapped wx.RendererNative to draw

the sash in a platform specific way, but it gracefully falls back to a

generic sash for the current releases of wxPython that don't have
wx.RendererNative yet. It still has a couple rough edges but seems to

work well otherwise.

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/wx/lib/splitter.py
http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/demo/MultiSplitterWindow.py

http://alldunn.com/wxPython/stuff/multisplitter-snapshot1.png
http://alldunn.com/wxPython/stuff/multisplitter-snapshot2.png

Very nice job Robin... I still don't know what t o do with CVS versions
of wxPython, so I'll wait for the first daily or prerelease. As Herb pointed
out, this might be a useful control for many applications. Mhm... has the
era of new wxPython controls begun? :wink:

Andrea.

Thanks. I have attached Ricardo's code to that email for all to look at too.
Would be nice if either (or both if there is a good reason) end up maintained
as standard stock wxPython widgets

In your special case, since you already have done such a huge work anyway with
wxPython I think it's reasonable to pay the bounty to both of you.

Please email me your PayPal or similar account details

Horst

SashDock.tar.gz (9.02 KB)

···

On Sat, 11 Jun 2005 20:29, Robin Dunn wrote:

I already had this started so I thought I'd finish it up today. It is

Dom, 2005-06-12 às 02:20 +0000, Horst Herb escreveu:

···

On Sat, 11 Jun 2005 20:29, Robin Dunn wrote:
> I already had this started so I thought I'd finish it up today. It is

Thanks. I have attached Ricardo's code to that email for all to look at too.
Would be nice if either (or both if there is a good reason) end up maintained
as standard stock wxPython widgets

In your special case, since you already have done such a huge work anyway with
wxPython I think it's reasonable to pay the bounty to both of you.

I don't need that you pay me. I already had in my mind to ask you to
donate that money, half to your project,gnumed, and half to wxpython.

Do what ever you want.

Ricardo

Ricardo,

you earned the money fair and square.
Just give me your account details so that I can transfer it to you.

Horst

Seg, 2005-06-13 às 12:35 +0000, Horst Herb escreveu:

Ricardo,

you earned the money fair and square.
Just give me your account details so that I can transfer it to you.

I insist... donate the money for me.

Attached, goes a small improvement.

Ricardo

SashDock.tar.gz (9.24 KB)