Welcome to %s forums

BrainModular Users Forum

Login Register

sdkDialogInputBox please allow multiline prompt

Tell us what you'd like Usine to do
Post Reply
sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 19 Feb 2018, 13:34

With the original SDK dialog prompts, such as sdkDialogConfirmationYesNo(msg), the message can be a multiline text string (i.e. with newline characters in), which gets displayed properly above the buttons, so you can include a paragraph of text explaining something.

With the new input dialog:
AnsiCharPtr sdkDialogInputBox(AnsiCharPtr caption, AnsiCharPtr prompt, AnsiCharPtr defaultValue),
only the first line a multiline prompt string is displayed, to the left of the input box.

It makes sense to have the prompt to the left of the input box in a common GUI style, but this means it is not possible to include a message or explanation paragraph in the input box, which is something I really need.

Could the sdkDialogInputBox please be changed so that if you have a multiline text string, all lines except the last one are displayed above the input box in a similar way to the confirmation dialogs.

For example, if the prompt text string is
"This input box allows you to specify the name for the item.nThe tag %date will be replaced by the current date.nPlease enter item name:",

should display in the dialog box like this:

This input box allows you to specify the name for the item.
The tag %date will be replaced by the current date.

Please enter item name: [ ]


Or alternatively, the entire prompt could be displayed together, just like the confirmation dialogs, with the input box beneath it and the buttons beneath that.

Thanks,
Simon.

sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 22 Feb 2018, 13:00

I've also noticed that there is an OK and Cancel button on the sdkDialogInputBox, but whichever you press, the input string is returned the same way.
If there is going to be 2 buttons, they need to do somethign different. Can we have either a way to return which button was pressed, or to return NULL (rather than an empty string) if cancel is pressed.
Thanks,
Simon.

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 26 Feb 2018, 17:00

ok, in the v163 'n ' or will create a line break

for the sdkDialogInputBox, on cancel, the default value is returned, nothing I can do since it's a system behavior, not Usine.

sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 07 Mar 2018, 12:48

Hi,
I just checked in 3.0.163-1 and the dialog is the same as before.
Only the text before the first "n" character is displayed in the prompt text.
Do we need a new SDK to go with it ?

Thanks,
Simon.

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 12 May 2018, 18:45

Can you try with a space after : "/n " instead of "/n" ?
will be corrected in the v171

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests