Vertical tool boxes?

I've looked at all the demos, in fact.

The reference model for the vertical toolbox about can be found on the left-hand side of just about any graphics app; the original MacPaint screen can be seen here, <http://en.wikipedia.org/wiki/MacPaint>, in Wikipedia. It's a very successful widget design, nearly 25 years old now. What bothers me about not finding examples--in any form--is that this apparently is not the mainstream of the WxWidgets API and therefore I am likely to have trouble if I attempt to implement this very common interface.

Randolph

Couldn't you just put multiple toolbars together in a sizer to make a toolbox?

···

On Mon, Nov 17, 2008 at 3:13 AM, R Fritz <rfritz@u.washington.edu> wrote:

I've looked at all the demos, in fact.

The reference model for the vertical toolbox about can be found on the
left-hand side of just about any graphics app; the original MacPaint screen
can be seen here, <http://en.wikipedia.org/wiki/MacPaint&gt;, in Wikipedia.
It's a very successful widget design, nearly 25 years old now. What
bothers me about not finding examples--in any form--is that this apparently
is not the mainstream of the WxWidgets API and therefore I am likely to have
trouble if I attempt to implement this very common interface.

C M wrote:

  

I've looked at all the demos, in fact.

The reference model for the vertical toolbox about can be found on the
left-hand side of just about any graphics app; the original MacPaint screen
can be seen here, <http://en.wikipedia.org/wiki/MacPaint&gt;, in Wikipedia.
It's a very successful widget design, nearly 25 years old now.

then it might be the right time to rethink the design :wink:
Why is the toolbox on the left and not on the right ?

  What
bothers me about not finding examples--in any form--is that this apparently
is not the mainstream of the WxWidgets API and therefore I am likely to have
trouble if I attempt to implement this very common interface.
    
Couldn't you just put multiple toolbars together in a sizer to make a toolbox?
  

looks like a good suggestion to me,
and I guess you can also place it on the right :wink:

cheers,
Stef

Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629.
The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629.

···

On Mon, Nov 17, 2008 at 3:13 AM, R Fritz <rfritz@u.washington.edu> wrote:

Hello,

vtoolbox.py (1.15 KB)

···

On Mon, Nov 17, 2008 at 2:13 AM, R Fritz rfritz@u.washington.edu wrote:

I’ve looked at all the demos, in fact.

The reference model for the vertical toolbox about can be found on the left-hand side of just about any graphics app; the original MacPaint screen can be seen here, <http://en.wikipedia.org/wiki/MacPaint>, in Wikipedia. It’s a very successful widget design, nearly 25 years old now. What bothers me about not finding examples–in any form–is that this apparently is not the mainstream of the WxWidgets API and therefore I am likely to have trouble if I attempt to implement this very common interface.

I am not sure why you think you would have trouble to implement something like this? Its simply a panel with various buttons on it. Find attached my 90 second implementation of it, should be enough to give you the idea.

Regards,

Cody

I'll have to experiment--thanks.

Randolph

···

On Nov 17, 2008, at 1:49 AM, C M wrote:

Couldn't you just put multiple toolbars together in a sizer to make a toolbox?

Thanks!

Randolph

···

On Nov 17, 2008, at 9:10 AM, Cody Precord wrote:

Skipped content of type multipart/alternative-------------- next part -----=
---------
import wx

class TestFrame(wx.Frame):
   def __init__(self, parent, title=3D"Vertical Toolbox"):
       wx.Frame.__init__(self, parent, title=3Dtitle)

       # Attributes
       self._panel =3D TestPanel(self)
       self._txt =3D wx.TextCtrl(self, style=3Dwx.TE_MULTILINE|wx.TE_RICH2)

       sizer =3D wx.BoxSizer()
       sizer.AddMany([(self._panel, 0, wx.ALIGN_TOP),
                      (self._txt, 1, wx.EXPAND)])
       self.SetSizer(sizer)
       self.SetAutoLayout(True)
       self.Bind(wx.EVT_BUTTON, self.OnButton)

   def OnButton(self, evt):
       self._txt.SetValue("Button: %s Clicked" % str(evt.GetId()))

class TestPanel(wx.Panel):
   def __init__(self, parent):
       wx.Panel.__init__(self, parent)

       bmp =3D wx.ArtProvider.GetBitmap(wx.ART_ERROR, size=3D(16,16))
       sizer =3D wx.GridSizer(8, 2, 2, 2)
       for id_ in [wx.NewId() for x in range(16)]:
           btn =3D wx.BitmapButton(self, id_, bmp)
           sizer.Add(btn)

       self.SetSizer(sizer)
       self.SetAutoLayout(True)

if __name__ =3D=3D '__main__':
   app =3D wx.App(False)
   frame =3D TestFrame(None)
   frame.Show()
   app.MainLoop()

R Fritz wrote:

I've looked at all the demos, in fact.

The reference model for the vertical toolbox about can be found on the left-hand side of just about any graphics app; the original MacPaint screen can be seen here, <http://en.wikipedia.org/wiki/MacPaint&gt;, in Wikipedia. It's a very successful widget design, nearly 25 years old now. What bothers me about not finding examples--in any form--is that this apparently is not the mainstream of the WxWidgets API and therefore I am likely to have trouble if I attempt to implement this very common interface.

Vertical toolbars are supported and are regularly tested in the wx C++ samples. Tool palettes like what are typically used in paint programs are not standard widgets, but are super simple to implement yourself. For example, see the superdoodle.py app in the samples/doodle folder for a simplistic example.

···

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

R Fritz wrote:

Couldn't you just put multiple toolbars together in a sizer to make a
toolbox?

I'll have to experiment--thanks.

Randolph

Just look at the wxPython Demo under "Recent Aditions/Updates" or under
""Book" Controls" try "Toolbook", to make it vertical go to the "Demo
Code" tab and in :
class TestTB(wx.Toolbook):
    def __init__(self, parent, id, log):
        wx.Toolbook.__init__(self, parent, id, style=
                             wx.BK_DEFAULT
                             #wx.BK_TOP
                             #wx.BK_BOTTOM
                             #wx.BK_LEFT
                             #wx.BK_RIGHT
                            )
        self.log = log
comment the "wx.BK_DEFAULT" option and uncomment the "wx.BK_LEFT"
option, "Save Changes" and go back to the "Demo" tab.

If that's not good then under "Core Windows/Controls" try "ToolBar", go
to the "Demo Code" tab and in :
TBFLAGS = ( wx.TB_HORIZONTAL
            > wx.NO_BORDER
            > wx.TB_FLAT
            #| wx.TB_TEXT
            #| wx.TB_HORZ_LAYOUT
            )
replace "wx.TB_HORIZONTAL" with "wx.TB_VERTICAL", save and run (it will
not be pretty but you'll get the point.

HTH

···

On Nov 17, 2008, at 1:49 AM, C M wrote:

Thanks!

Randolph

···

On Nov 17, 2008, at 4:03 PM, Robin Dunn wrote:

Vertical toolbars are supported and are regularly tested in the wx C++
samples. Tool palettes like what are typically used in paint programs
are not standard widgets, but are super simple to implement yourself.
For example, see the superdoodle.py app in the samples/doodle folder for
a simplistic example.