On Sun, 4 Jun 2017 15:20:04 -0700 (PDT)
Adrian Calvin <developer.adr...@gmail.com> wrote:

> OK, I figured out how to embed my new widget manually into the main
> layout. But I am confused as to how to make it load automatically
> into the layout.

Not sure if you're familiar with the pane layout machinery
carefully concealed in the context menu that pops up when you right
click the pane dividers.  Also accessible via

Window -> Arrange Panes -> Pane Management Menu

although that loses some of the left/right context that right clicking
a particular pane divider provides.

Anyway, this code:

https://github.com/leo-editor/snippets/blob/master/examples/demo_widget.py

gives full and minimal examples for adding a widget in its own pane
using that mechanism.  If you want it to appear at startup / load,
manually create the pane where you want it, then use "Save Layout" in
that same menu.

In the linked examples the added widget is a slider that does noting,
but you can provide your own widget that can anything at all.

Cheers -Terry

> On Sunday, June 4, 2017 at 1:39:59 PM UTC-5, Adrian Calvin wrote:
> >
> > Hi,
> >
> > I am trying to figure out the *easiest *way to embed a widget in
> > the layout, *exactly* like viewrendered.
> >
> > The problem is, that being a neophyte to both leo and python, that
> > plugin is just way to complex for me to use as a model or template
> > at the moment.
> >
> > How would I go about embedding a widget, that I can then add other 
> > controls to, textboxes, buttons, etc).
> >
> > PS.  I know how to do this by adding to the log pane, but I want
> > something stand-alone, that is always visible.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to