Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6915 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am trying to incorporate custom dialogs, but they do not seem to size to their content. Although you can resize and expand a dialog when it appears by dragging the lower right corner, all dialogs that popup after come up with those same expanded dimensions.

How can I set the dimensions of a custom dialog programatically? Thanks.

Posted

You can't. Maybe the dialog plugins can, but not FM's native custom dialog.

Having said that, the size of the dialogs is stored in the registry on Windows and probably a plist on Mac so theoretically you could manipulate the settings there before showing the dialog. Seems like a lot of work though (and remember that messing with the preferences, especially in the registry can lead to catastrophic results if you're not careful).

Posted

Trying to resize cust dialogues is more trouble than its worth trust me... been there done that. Yeah if your really desperate just go for the plugins.

Posted

Hi Mark,

Because of Custom Dialog limitations, I prefer (in most cases) to make my own by simply using a layout as a small popup window. Then I can also control precise window placement (I place message right in front of their face over what they're working on); I can lock User from leaving until I say so; and I can include popup menus, checkboxes or anything I wish. I make all my dialogs look similar and distinct and use the same globals and layout. Heck, you can even make them look just like a Custom Dialog if you wish!

You'll have to be satisfied with the default, use a plugin or roll your own. :wink2:

LaRetta

Posted

Thanks for the help on custom dialogs. If I can continue the conversation a bit ...

Option A -- Plug-In

I found the Dialog plug-in from Troi. The product details do not say whether you can specify dimensions, however. Also, what happens when I create a runtime? Is the plug-in automatically integrated?

Option B -- Layout

Thanks, LaRetta, for this idea. So is it possible to make a layout appear on top of another layout, just like a modal custom dialog would? Not exactly sure how to do this...

Posted

So is it possible to make a layout appear on top of another layout, just like a modal custom dialog would?

Hi Mark,

Most certainly. Popup message windows are cool! I don't have time to explain how (finishing a deadline currently) but others can certainly explain it. There are hundreds of examples here on Forums ... maybe Lee can give you proper search ideas to narrow it down or someone can provide a demo. If you don't get assistance with it, I'll try to provide a detailed answer or demo tonight when I get back. :wink2:

L

Posted (edited)

I use Troi (Dialog and File Plugins). No, you cannot specify dialog dimensions. They both work fine with runtimes. You'll need to copy the plugins to the solutions 'System' Folder' (might be called 'Extensions in v8).

IMHO, I'd rather use the dialog plugin than create additional layouts to handle dialogs...these can proliferate rapidly when you write interative solutions.

Steve

Edited by Guest
Posted

Okay, so you can't specify the dimensions of a dialog box using Troi, but will the dialog expand itself vertically to accommodate more than just a few lines of text? Or would lengthy text be cut off?

Posted

LaRetta, would you be talking about the 'New Window' command? I've experimented with that, but I just can't make the new window look like a normal dialog box. Can't get rid of the min/max buttons, can't get rid of the zoom controls, can't get rid of the thick border...

Posted

Marc--

What LaRetta is saying is, create a layout with the information you want. Make it look how you want it to look. Put as many buttons on it as you need (1, 2, 4, 32), and have these buttons perform whatever scripts you designate. (I use scripts for these buttons because inevitably, I find I need to perform some extra processing behind the scenes, so it ends up being easier to use scripts from the outset. My main exception: Cancel, which just closes the window.)

When it's time to call my "dialog", I open a new window, go to the dialog layout, hide status bars and resize the window (I do this throughout my app by using a generic Set Window script). The dialog appears on top, and the user clicks their choice, as before.

There are downsides:

1) A lot of layouts to manage (1 for each dialog)

2) More scripts (since you have to script "up to" the dialog, and then "out from" the dialog, rather than the single script processing Get(LastMessageChioce))

3) More confusing window management (what window am I in right now, and what is my context)

4) More flickering on the screens.

There are upsides:

1) Full control over the content and layout of the messages.

2) Web compatibility (this is a big one for me)

I'll note that for a while I experimented with creating my own generic message layouts (one each for 1, 2 and 3 button dialogs), using SoftwareForHumans' EventScript to trigger scripts identified in my messages table, but that wasn't web compatible, so I ended up going the slow and steady route.

HTH,

David

Posted

"What LaRetta is saying is" ... Nope. Simply:

1) ONE layout not one for each dialog!! And only CLOSE button - not lots of buttons.

2) Populated with globals which can be accessed anywhere so process (and layout) is not locked to a TO.

3) More scripts? No more than the scripts necessary without the popup. My scripts just have one additional line to run the generic popup window script (when needed).

4) More confusing window management? Nope. It's tracked in another multiline field automatically.

5) Flickering? Absolutely none - not even on Windows.

6) Headers text (ERROR, INFORMATION, INPUT REQUIRED) ... change dynamically (built in, depending upon the window name called). Header color changes also (Error is red, Info is yellow).

7) Since they contain globals, there are no record-locking issues.

But it was indicated that a message box 'with the thick border' (or minimize buttons) wasn't what was wanted. I didn't want to waste time providing details or demo on popup window when it didn't fit the request anyway. I'm also in the middle of network crisis and simply don't have the time right now. :wink2:

L

Posted

Another way to slay-this-dragon is to use a series of custom dialogs. Put only as much text on each dialog so that it all shows without resizing. Then have only one button that says "More", "Continue", or something like that.

Posted

LaRetta--

Sorry. Didn't mean to put words in your mouth. I misinterpreted what you meant by "Popup message windows" to mean something similar to how I've done it.

I find that with most of my dialogs, a simple close window is not enough, which is why I have adopted the admittedly convoluted approach that I have. Most of my dialogs usually elicit some feedback from the user ("Do you want to accept this value, or try another?"), which then perform different actions based on the user's selection.

All the pros and cons I listed were based on the approach that I described.

David

Posted

Thanks David and LaRetta. My head is kind of spinning, but you've pointed me in some good directions.

Continuing to discuss the layout idea for creating dialogs...

1. What is the trick to making the dialog modal, so that: User clicks button, New Window[] brings up imitation dialog box, user cannot exit or switch to any other window except by clicking one of the buttons in the dialog.

2. How to you deal with/trap/disable the Close/Minimize buttons, should the user decide to click one of those?

Thanks.

This topic is 6915 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.