Modal dialog without decorations

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

DarkKnight
Posts: 17
Joined: Tue May 10, 2016 3:22 am

Modal dialog without decorations

Post by DarkKnight » Wed Jan 27, 2021 4:20 pm

How do you create a custom modal dialog without buttons in the title bar like the ask or answer dialogs? I've created a stack and made it modal. The close and minimize buttons still appear, but disabled. The maximize button still also appears, but is active.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Modal dialog without decorations

Post by Klaus » Wed Jan 27, 2021 4:29 pm

You can set the decorations to EMPTY, if that is what you mean?
Either via the inspector for your stack or via script:

Code: Select all

set the decorations of stack "your dialog here" to EMPTY

DarkKnight
Posts: 17
Joined: Tue May 10, 2016 3:22 am

Re: Modal dialog without decorations

Post by DarkKnight » Wed Jan 27, 2021 4:36 pm

No, the ask and answer dialog open with a titlebar with no visible buttons. How do I get that appearance. Setting the decorations to empty removes the titlebar entirely..

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Modal dialog without decorations

Post by Klaus » Wed Jan 27, 2021 4:58 pm

Then: set the decorations to "title".
That should remove everything but the TITLE of the window.

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Modal dialog without decorations

Post by bogs » Wed Jan 27, 2021 5:03 pm

I'm on Linux (the look may be different for your OS), but I think you want "Title" in the selector. These are the available arrangements for the title bar -

Image

You get there by hitting the wand button here -

Image

I should point out that on 'nix, the modal dialogs that ship with Lc show up with a close button, as you see here (at least, on XFCE) -

Image

**Klaus beat me to it while I was uploading pictures! Oh the agony ... hee hee
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Modal dialog without decorations

Post by FourthWorld » Wed Jan 27, 2021 5:10 pm

DarkKnight wrote:
Wed Jan 27, 2021 4:36 pm
No, the ask and answer dialog open with a titlebar with no visible buttons. How do I get that appearance. Setting the decorations to empty removes the titlebar entirely..
What are the decorations of stack "Answer Dialog"?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

DarkKnight
Posts: 17
Joined: Tue May 10, 2016 3:22 am

Re: Modal dialog without decorations

Post by DarkKnight » Wed Jan 27, 2021 5:17 pm

The decorations of the stack "Answer Dialog" are "default". Setting the decorations to "title" does not make the buttons disappear in the titlebar.

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Modal dialog without decorations

Post by bogs » Wed Jan 27, 2021 5:23 pm

Which OS are you using, DarkKnight? Just curious at this point.
Image

DarkKnight
Posts: 17
Joined: Tue May 10, 2016 3:22 am

Re: Modal dialog without decorations

Post by DarkKnight » Wed Jan 27, 2021 6:00 pm

Mac OS Mojave

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Modal dialog without decorations

Post by Klaus » Wed Jan 27, 2021 6:14 pm

I'm also on Mojave and this works for me, see attachement:
window_title.jpg
Title only!

DarkKnight
Posts: 17
Joined: Tue May 10, 2016 3:22 am

Re: Modal dialog without decorations

Post by DarkKnight » Wed Jan 27, 2021 6:42 pm

I am seeing something different on my end. See attachment.
Attachments
Screen Shot 2021-01-27 at 11.35.37 AM.png

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Modal dialog without decorations

Post by Klaus » Wed Jan 27, 2021 7:02 pm

Very strange!? :shock:
I am using LC 9.6.2 RC1

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Modal dialog without decorations

Post by bogs » Wed Jan 27, 2021 8:19 pm

Yah, I don't know what to tell you either DK, I can't simulate any mac environment past Snow Leopard.

But if Klaus is on the system you are using, you should both see the same things. Very weird :?
Image

DarkKnight
Posts: 17
Joined: Tue May 10, 2016 3:22 am

Re: Modal dialog without decorations

Post by DarkKnight » Wed Jan 27, 2021 8:28 pm

I know. Ask and answer dialogs appear correctly. I even downloaded another stack that appears correct, but anything I create do not.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Modal dialog without decorations

Post by FourthWorld » Wed Jan 27, 2021 9:15 pm

If the stack properties are identical to those of the Answer Dialog, what code are you using to show your dialog?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply