AllenDang/giu

A couple of questions

mdotv opened this issue · 2 comments

mdotv commented

Hi! I have some questions, sorry if I missed something in docs and examples.

  1. Is there a way to have two native windows in one program?
  2. How to apply ContextMenu for the whole layout (not only for content in it)?

I want to achieve this:
image

I have done it using this code, but it only works for last layout in SplitLayout. I would like to apply it for the left layout:

return g.Layout{
		g.MenuBar().Layout(a.catalog.MenuBar()),
		g.SplitLayout(g.DirectionHorizontal, 340, a.catalog.Layout(), a.order.Layout()),
		g.ContextMenu().Layout(
			g.Selectable("Context menu 1").OnClick(nil),
			g.Selectable("Context menu 2").OnClick(nil),
		),
	}

@mdotv I'm sorry, I had to miss this issue somehow...

Is there a way to have two native windows in one program?

No, it is not possible yet

How to apply ContextMenu for the whole layout (not only for content in it)?

you can make this a ChildWidget and apply context menu to it

Closing as likely fixed. Feel free to ping me if you think it should be re-opened.