# showFormInDialog and text toolbar problem

**URL:** <https://forum.servoy.com/t/showformindialog-and-text-toolbar-problem/9066>\
**Category:** Classic Servoy\
**Created:** [May 7, 2008, 2:06pm UTC](https://forum.servoy.com/t/showformindialog-and-text-toolbar-problem/9066 "2008-05-07T14:06:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [May 7, 2008, 2:06pm UTC](https://forum.servoy.com/t/showformindialog-and-text-toolbar-problem/9066/1 "2008-05-07T14:06:50Z")

</div>

Hello,

in my solution all toolbars are hidden. I have only one case, where I’d like to see the text toolbar to allow (minimal) HTML formatting. The form in question is shown in a dialog.

If I call application.showFormInDialog(…, showTextToolbar = true) I see the toolbar. But…

1. The window size is too small then (I pass -1 for coordinates/sizes)
2. Any other form in dialog now has that toolbar

Especially point 2 is a big problem. It seems that I don’t get rid of that toolbar anymore. I think the behavior should be that only if that parameter (showTextToolbar) is set to true, a toolbar should be shown and the toolbar should be hidden otherwise.

Can this be fixed?

Thanks  
Patrick

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [May 15, 2008, 12:09pm UTC](https://forum.servoy.com/t/showformindialog-and-text-toolbar-problem/9066/2 "2008-05-15T12:09:21Z")

</div>

did you make a case for this?

about point 2 you could go around that in 3.5.x by using a name for the dialog specific for that dialog…  
Then you have a special instance of the dialog just for that form where you show the toolbar on.

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [May 15, 2008, 12:26pm UTC](https://forum.servoy.com/t/showformindialog-and-text-toolbar-problem/9066/3 "2008-05-15T12:26:44Z")

</div>

I will try that workaround.

Yes, I did make a case (131423) and the answer was:

> In the case of having showTextToolbar set to false, we remove the TextToolbar from the form (especially in the case of a cached window).

I am not at all happy with that answer. I think the default behavior should be: no text toolbar unless that parameter is set. If I set that once, I don’t want it to “stick” for ever. And I don’t want to change the hundreds of showFormInDialog() calls with showTextToolbar = false, just because I need that toolbar at one place.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [May 15, 2008, 12:35pm UTC](https://forum.servoy.com/t/showformindialog-and-text-toolbar-problem/9066/4 "2008-05-15T12:35:32Z")

</div>

that is what that comment tells you if you set it to false (default) then it will be removed. If true then it will be added. it wont stick

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [May 15, 2008, 12:39pm UTC](https://forum.servoy.com/t/showformindialog-and-text-toolbar-problem/9066/5 "2008-05-15T12:39:51Z")

</div>

Yes, but if I want it only once? I open that form with textToolbar = true. Any other showFormInDialog I use is just

showFormInDialog(myForm)

No other params. But after I set the toolbar once, I see it in all other form in dialogs. That’s what I mean with “stick”. Once set, set forever. Not so great in my eyes. The only workaround I came up with was to open a formInDialog with toolbar=off in the onHide method of my toolbar form and hide that immediately. Do you understand what I find annoying?

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [May 15, 2008, 12:41pm UTC](https://forum.servoy.com/t/showformindialog-and-text-toolbar-problem/9066/6 "2008-05-15T12:41:03Z")

</div>

Your “workaround” seems to work, though. So thanks for that tip!
