2

I'm deploying a package to consumers to test out that isn't complete and ready to use yet, just so they can give me feedback on usability and do feature requests. While doing so I want it to be clear to them that this is not ready for use, so I added this to popup before the program runs:

DialogInput[{TextCell[
   "This program is incomplete and not intended for use in research 
papers, only for testing user friendliness.", FontSize -> 14, 
   FontWeight -> Bold],
  Button["Proceed", DialogReturn[], 
   Enabled -> Dynamic[Clock[1, 3, 1] == 1]]
  }
 ]

Now I set a Clock so that way they can't exit it too fast and it makes them more likely to read the warning. However there is still the "X" in the top right corner, is there any way to create a window in which that isn't there? Below I've attached a screenshot of the window for clarity. enter image description here

Daniel
  • 115
  • 6

1 Answers1

2

Here's a solution using WindowFrameElements and "PrettyProgressBar" for the win:

c = 0; CreateWindow[
 DialogNotebook[{TextCell[
    "This program is incomplete and not intended for use in research papers,   
     only for testing user friendliness.", FontSize -> 14, 
    FontWeight -> Bold],
   ResourceFunction["PrettyProgressBar"][Dynamic[1 - c], Appearance -> "Barber", 
     Background -> Lighter@Gray, ImageSize -> 340],
   DefaultButton["I UNDERSTAND", DialogReturn[], 
     Enabled -> Dynamic[(c = Clock[1, 3, 1]) == 1]]}], 
 WindowFrameElements -> {}, WindowTitle -> "Warning!",  WindowSize -> {350, 120}]
M.R.
  • 31,425
  • 8
  • 90
  • 281
  • Unfortunately, like most things, notebook options such as WindowFrameElements doesn’t work in the cloud. – M.R. Dec 10 '20 at 02:25
  • This is exactly what I was looking for, and fixes that my clock was taking ~10 seconds instead of the specified 3. Thank you! – Daniel Dec 10 '20 at 06:19