Is it possible to have different font types and sizes in a single dialog message.
Example dialog message:
Normal size, Bold font:
“Do you want to save changes to this document before closing?”
New line smaller size, plain font and a few spaces down:
“If you dont save, your changes will be lost.”
Then I would have my buttons:
“Don’t Save” “Cancel” “Save”
I know I could probably create a form with this type of layout, but can this be done with the dialog plug-in methods, such as, showWarningDialog and others?
plugins.dialogs.showWarningDialog('Warning', '<html><b>Do you want to save changes to this document before closing?</b>
If you dont save, your changes will be lost.
</html>', 'Dont Save', 'Cancel', 'Save')
Guess I should read the question before answering. Try this instead:
plugins.dialogs.showWarningDialog('Warning', '<html><font face=\"Tahoma\" size=\"4\"><b>Do you want to save changes to this document before closing?</b></font>
<font face=\"Arial\" size=\"3\">If you dont save, your changes will be lost.</font>
</html>', 'Dont Save', 'Cancel', 'Save')
Guess I should read the question before answering. Try this instead:
plugins.dialogs.showWarningDialog('Warning', '<html><font face="Tahoma" size="4"><b>Do you want to save changes to this document before closing?</b></font>
<font face="Arial" size="3">If you dont save, your changes will be lost.</font>
</html>', 'Dont Save', 'Cancel', 'Save')
Good Luck
Hey this is what I needed. So basically I just use html code any where I want to format text. Are there any known places that html code cannot be used in Servoy?
While playing around with the dialog formatting I discovered that the dialogs in Servoy are not intelligent. In other words, they don’t dynamically wrap text if it is too long. I put in a long text block and when I displayed the dialog the text, it was outputted as one line. The sides of the dialog stretched beyond the screen boundaries. I had to put in
tags to break it up.
Is there anyway that I can put in a min and max dialog size and the text will be dynamically wraped for me. Or will I have to do this all by hand for each dialog message. It would be great if I did not have to do this as I don’t always know what the dialog message will be.
Servoy Developer
Version R2 2.1.2-build 315
Java version 1.4.2_06-b03 (Windows XP)