I am using SketchFlow for a prototype. Right now when the user clicks certain 'links' a trigger is excuted which calls navigatetoscreenaction and I supply the target screen. The problem is instead of going to this screen and leaving my main window, I want my target screen to popup into a modal dialog. Can you accomplish this with Sketchflow?
Yes, but you might have to code it up yourself. If you truly want a dialog you will have to do it in the event handler for the item you are clicking. You would do it just like any other dialog on the platform you are using.
If you just want to simulate it, you could make the screen into a component screen and use visual states to hide/show it. Made it hidden in the base state, and create a show state that you trigger with a behavior.
yes you sure can, with a component screen. Right click on your source screen in the sketchflow map and there it is.
Related
In our application, a modal dialog is shown that the user needs to confirm/close before other interaction is possible/allowed. This dialog is a self-implemented form, so can be adjusted to our needs.
An external event (in our case: a scan from a manual barcode scanner) provides input for the application. When the dialog is in front of the application, I would like to inform the user the scan/input is not processed. An idea is to simulate the behaviour that happens when clicking the form in the background of the modal dialog. By default, Windows then lets the dialog borders 'flash' and a sound is heard ('bonk' sound as described here: Delphi - How do you generate an event when a user clicks outside modal dialog?).
My question is:
Is it possible to programmatically simulate that behaviour, in order
to let user know the dialog has to be closed first?
Additional question: is this proper UI handling or should the dialog itself display an additional info text (e.g. as a footer text) instead of just 'flash'. I like to avoid displaying another modal dialog on top of the first one; to me that not seem best practice as well.
Thank you for any feedback/solution.
Use the FlashWindow or FlashWindowEx functions to achieve this.
I want to create a control in WinAPI which works like some toolbar buttons do: you can click the button but it cannot be focused; the focus stays on the control that had it. How do I go about it?
This is not a complete answer because I've abandoned the task eventually, but what I found is that in fact, controls have to SetFocus(Self) manually and they usually do that in WM_LMOUSEDOWN handlers.
So to handle clicks like toolbar buttons do, it's enough to not do that.
Problem is, standard controls and common frameworks usually do this automatically deep in their internals. With frameworks such as MFC or VCL it might be possible to hack this off somehow, standard WM_LMOUSEDOWN handler for BUTTON control seems to do SetFocus, and it can't simply be skipped because it also does click processing.
I want to create a custom NSWindow that acts as a modal dialog. By custom I mean it has normal user controls in the window, with a "OK" and "Cancel" buttons. The dialog will contain read only information, and have a few checkboxes, secure edit fields, etc.
The MainMenu.xib file will have the normal Window visible at launch, plus include the custom NSWindow (which is NOT visible at launch).
I am trying to find example code to launch the window in modal mode (after the app initializes and launches main window), and on "OK" run a process, and on success of that process hide the dialog. Or on failure, keep the dialog up, but show an error sheet on the dialog.
Any help is appreciated, thanks.
You want to look at NSApplication’s -runModalForWindow: and/or -runModalSession: methods. Note that using modal windows is generally a bad idea and if it’s at all possible to avoid doing so, you should; that said, sometimes needs must.
As far as launching a process, waiting for it to finish and so on, you can probably do what you need with NSTask, although you don’t provide sufficient detail to be certain. You’d probably want to observe NSTaskDidTerminateNotification to tell you when the task had finished.
See
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/OperatingSystem/OperatingSystem.html
for more on NSTask and
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/WinPanel/Concepts/UsingModalWindows.html%23//apple_ref/doc/uid/20000223-CJBEADBA
for more about modal NSWindow usage.
Have a look at NSApplication's -runModalForWindow: method, and "Using Application-Modal Dialogs."
I have a desktop application written in Ruby that is using GTK2. It's just a small test application to play with GTK2, but I'm having problems achieving what I want to do. Is there any way using GTK2 to get at the titlebar (apart from setting the title), specifically to either add a button to it (beside the min/max/etc, B in the below diagram) or to add an option to the menu that pops up when you click the icon on the titlebar (A in the below diagram)?
I'm thinking there might not be because GTK is meant to work with many many different window managers, but I just wondered if there was. As a side question, what event does clicking the 'cross' button fire? At the moment if the user clicks that the window disappears but the program doesn't end - I need to capture that event and quit the program.
Thanks for any help, including hitting me over the head and telling me how silly I am.
Note that this is possible in GTK 3.10 and up, by using gtk_window_set_titlebar(). It replaces the window manager's title bar with a custom one. GtkHeaderBar is a good custom title bar class to use.
You can't, however, make it look just like the window manager would, because you won't know which window manager the user is running.
No, the title bar is owned by the window manager and you will typically not have direct access to it.
When the user tries to close the window by clicking the window manager's button, the window will receive the delete event.
Firefox has this nice find-a-text-on-the-page dialog, which is non-modal and shows up at the bottom of the window. How to do something similar using just Win32? I guess there has to edit control but do I have to position it manually on parent window WM_SIZE? How do I dismiss the dialog, i.e. how to make it disappear?
As said above, use a rebar and put an edit control and the buttons that you need on it. You'll have to manage all the rest yourself, manually (close button, showing/hiding it, etc.).
I guess that is what you call a rebar...http://msdn.microsoft.com/en-us/library/bb774373(VS.85).aspx. Google if you need more info...