On Monday 01 December 2008 03:55:04 am Ricardo Aráoz wrote:
> Ed Leafe wrote:
> > On Nov 28, 2008, at 11:46 AM, johnf wrote:
> >> Is there an example of a using a popup?  Almost everything that
> >> calls for a
> >> popup has to do with menu's or a special routine for dGrid.   So how
> >> does one
> >> setup a popup?
> >
> >     The calendar for dDateTextBox is a good example. It uses the
> > dForm.FloatingPanel, which controls positioning relative to the
> > "attached" control.
> >
> >
> > -- Ed Leafe
>
> You might also want to ckeck the wxpython demo under "More
> Windows/Controls" see the "ComboCtrl" examples.
>
> HTH

What I do is create the menu

self.Sizer=vs=dabo.ui.dSizer('v')
        mymenu=dabo.ui.dListControl(self)
        mymenu.setColumns( ("Title", "Subtitle", "Release Year") )
        mymenu.setColumnWidth(0, 150)
        mymenu.setColumnWidth(1, 100)
        mymenu.setColumnWidth(2, 200)
        mymenu.append( ("The Phantom Menace", "Episode 1", 1999) )
        mymenu.append( ("Attack of the Clones", "Episode 2", 2002) )
        mymenu.append( ("Revenge of the Sith", "Episode 3", 2005) )
        mymenu.append( ("A New Hope", "Episode 4", 1977) )
        mymenu.append( ("The Empire Strikes Back", "Episode 5", 1980) )
        mymenu.append( ("Return of the Jedi", "Episode 6", 1983) )
        wd, ht = mymenu.Size
        mymenu.Size = (wd+10, ht+10)
        vs.append(mymenu)

then somewhere I add a method to show the popup 
 def _rightclick(self,evt):
        pos=self.getMousePosition()
        popupMenu= dabo.ui.dMenu()
        self.showContextMenu(popupMenu,pos)

Of course the above is bound to the event of some control.
-- 
John Fabiani


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to