Catching window state change by custom system buttons - forms

I'm developing custom system buttons - minimize, maximize and close window. It's working OK, but also I want to catch changing window state for Maximize / Restore down button. For example, when user double click on window title, window maximized and corresponding button should automatically repaint for "Restore down" state.
As I know, there is WM_SYSCOMMAND message for Form which notify for window state change. And we can get parent form for button (by GetParentForm()). So how to tie it all together? Or maybe you suggests something else?
Button inherits by TCustomControl.

Related

WicketTester: How to click secondary mouse button?

I want to test a wicket component which shows a context menu on click with the secondary mouse button.
With WicketTester.click(Component) I can click obviously simulate a click on a component. But how do I simulate a click with the secondary mouse button?
WicketTester does not provide means to test JavaScript!
If the context menu is being shown with Wicket Ajax call to the server to make it visible then you can do tester.executeAjaxBehavior(...).
If the menu is shown via JavaScript in the browser then WicketTester cannot check whether it is visible or not. But in that case you should be able to test selecting a menu item, i.e. sending an Ajax call with the appropriate value for the item.

How to position form's close button on right side?

On an old MS Access 2016 app, I remember that the close button was on the right side of the form's title bar.
Form being maximized the close button was on the right side of the app:
Now I have noticed that my close button is imediately after the form's name, so way off the right side:
Is there a way to configure this title bar and close button position or is an update of Access that changed this behaviour?
No. This is a part of the design changes enforced in the latest update.
The reason is, that this design - where you also can reposition tabs - is more in line with what users see elsewhere.
You could, of course, add your own close button at the far right by setting its property Anchor to: Right.

How to prevent GWT dialogbox from closing when clicking outside it

I plan to add a menu that pop ups when a user performs a certain action. This menu will include some fields that the user will fill out and then hit "Submit" which will close the dialog box and update the client based on information inputed.
However, I want the user to be able to close the dialog window by hitting cancel or submit, and not by clicking on the screen outside of the dialog box.
How can i do this? Or maybe I should just use a PopupPanel?
It's as easy as setting the auto-hide behavior to false, either at construction time or later.

How to avoid closing Popup

I have an Popup(not modal window) which shows textbox, when I start typing in the textbox I need to open another popup which show listbox,when I select any item from list box the popup disappears as well the previous popup also disappears how can I avoid closing of the very first popup on close of 2nd popup.
Use a standard "bandpopup" component - in this case you wouldn't even have a second popup to manage. Other thing which comes to my mind is add onClose event listener or event handler - whichever you prefer - and stop event propagation with Event.stop(caughtEvent). It will effectively prevent propagation of OnClose event and your first popup wouldn't be closed.

Open "Modal" Widow and close in TabGroup Based Application

Should Also have specified, I am developing this using Titanium Mobile.
I have a tabbed application. I have the need to open a "modal" like window for the purpose of allowing the user to enter some settings.
For example, you click the 3rd tab in the tabGroup. Some logic runs to see if a setting is set before continuing to create the view. The setting is not in place, so a new window animates in asking you to create this setting. After you create the setting, it closes and the view continues to render, or refreshes.
I cannot for the life of me figure this out. I have created the window, animated it into the current tab, and I have even successfully closed it. Getting the view to refresh or re-load is what is difficult. Also, the navigation bar offers the user the ability to navigate back to the window to change the setting, which I also do not want.
Any way to accomplish this?
I have the same need for logging the user into the application.
Use this code:
windowbject.open({modal:true});
This will only works in iOS.
And you want to refresh view which is behind this modal window then you have to add "focus" eventlistener to the window and write code in it.This code will execute when ever window got focus.
So when you close "modal" view then window behind it will get focus.
I hope this will help you.