~eliasnaur/gio

1

Re: Dropdowns

Details
Message ID
<CADXRfXQhrvPW2x3vv6OncY6Kfi_H9joFSPVxLh_X8y+3ChaCAw@mail.gmail.com>
DKIM signature
missing
Download raw message
I have a project that i'm considering Gio for but it does need dropdowns.
It can probably get away with List for now as the options are few and
the form is simple.

I know there's no structure yet for a menu, but is it possible to have
say 2 or more buttons fixed at the top and an area underneath that is
overwritten on click of the buttons?
It doesn't even need to look pretty/ like a menu so long as i can
change the main area with different elements.
There again i can work around that it it wasn't possible.

Re: Dropdowns

Details
Message ID
<C0DH8X6P6YOW.J4YTX55I0SBC@testmac>
In-Reply-To
<CADXRfXQhrvPW2x3vv6OncY6Kfi_H9joFSPVxLh_X8y+3ChaCAw@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Tue Feb 4, 2020 at 9:15 AM, rob d wrote:
> I have a project that i'm considering Gio for but it does need
> dropdowns.
> It can probably get away with List for now as the options are few and
> the form is simple.
>

I think List is the correct choice, even for the hypothetical complete
Menu implementation. List is simply a way to display a list of items,
regardless of their content.

> 
> I know there's no structure yet for a menu, but is it possible to have
> say 2 or more buttons fixed at the top and an area underneath that is
> overwritten on click of the buttons?

I think so. You may want to add a Flat property to material.Button, but
otherwise you're good to go.

The area underneath can be drawn/not drawn according to the buttons. If
you need the area to take up no space in layout, zero gtx.Dimensions last
in your area drawing routine.

You may run into more problems, but let's deal with them as you
encounter them.

If you need more responsive support, you could ping us in the #gioui
channel on https://gophers.slack.com/.

-- elias