New answers tagged

1

I can not reproduce your problem. I tried the following slightly modified version of your code and it worked fine. I evaluated it in V10.4.1 running under OS X 1.10.2. Manipulate[ dir, {{dir, ""}, None}, Button["Select Directory", dir = SystemDialogInput["Directory"], Method -> "Queued"]] I evaluated the code in new notebook with clean ...


4

There is a straightforward way to set CellMargins to be zero: DialogInput[ DialogNotebook[{ExpressionCell[Pane[RandomImage[], ImageMargins -> 8], CellMargins -> 0]}]] Instead of ImageMargins we can rely on CellFrameMargins: DialogInput[ DialogNotebook[{ExpressionCell[RandomImage[], CellMargins -> 0, CellFrameMargins -> 8, ...


3

I gave up looking for neat solution. Here's brute force. Since the bottom CellMargins are not respected then let's not use any! :) We can use Pane and its ImageMargins to take control over padding. DialogInput[ DynamicModule[{}, Pane[RandomImage[], ImageMargins -> 8], Initialization :> (SetOptions[EvaluationCell[], CellMargins -> ...


2

It really expects that you have some buttons along the bottom. DialogInput[Column[{Pane @ RandomImage[], Button["OK", DialogReturn[0]]}]] but you can do it this way DialogInput[Column[{Pane @ RandomImage[], ""}]] Update I Think it looks better with the bottom margin a bit larger than the top, but if you are being picky about equal margins, try ...


2

You can't run Kernel Blocking Dialogs on the preemptive link. But you can prompt other dialogs. And we can abuse that to run a procedure containing Input[], DialogInput[] or some system dialogs. The trick is to run your code inside an asynchronous initialization of the regular dialog: MessageDialog[ DynamicModule[{}, 1, Initialization :> ...


0

I think there is no general/stable way to prompt kernel blocking dialog from another kernel blocking dialog. answerPrompt[] := Input["Give me the answer please."]; confirmationPrompt[] := ChoiceDialog["Are you sure?"]; You don't need to do that though. Use the code below in your Do loop to answer and confirm questions: While[ answer = answerPrompt[]; ...



Top 50 recent answers are included