Hide "ControlBox", or "Close"/"Minimize"/"Maximize" buttons

92 views
Skip to first unread message

yves.s...@gmail.com

unread,
Feb 11, 2015, 4:43:09 PM2/11/15
to eto-...@googlegroups.com
Hi,

Impressed by this project, very much!
When trying out the notedown app I fiddled with some settings. I wasn't able to hide the "controlbox", as you could in WinForms or even in MonoMac (slightly different approach).

How should I accomplish this when I only want the user to have a view with controls, the title in the titlebar, but no minimize/maximize/close buttons (or icon).

Thanks

curtis

unread,
Feb 12, 2015, 11:47:58 AM2/12/15
to eto-...@googlegroups.com
You can hide the minimize/maximize buttons with the Form.Minimizable/Maximizable properties.

There's no way to hide the close button and/or control box yet.  You can submit an issue to github if you need this functionality, and I'll get around to it.  Pull requests are also very welcome. (;

Cheers!
Curtis.

Yves Schelpe

unread,
Feb 16, 2015, 4:05:00 AM2/16/15
to eto-...@googlegroups.com
I'll try to post a github issue asap.
But I could solve it by using "styles" no - just implement those natively then?

curtis

unread,
Feb 16, 2015, 12:19:57 PM2/16/15
to eto-...@googlegroups.com
Hi Yves,

Yes, a style could be used to do this.. e.g. for Mac:

Style.Add<Eto.Mac.Forms.FormHandler>("noclose", h =>
{
    h
.Control.StandardWindowButton(NSWindowButton.CloseButton).Hidden = true;
});

For WPF/WinForms there are some p/invokes you'll have to do, but the process is the same.

Cheers!
Curtis.
Reply all
Reply to author
Forward
0 new messages