Is it possible to remove window by clicking button? - xcode

I am writing an app in which i want a WelcomeWindow.
WelcomeWindow contain some Text , CheckBox Button (with text- Don't want this message again) and one Ok button.
What i want is when my CheckBox state is On like ([checkBox state ]== NSOnState) and if i press Ok button then this WelcomeWindow should be close and
it won't be open again even if i Quit the app and then again run the app.
Is it possible in mac app ?
Any help will be appreciated.
Thanks in advance!!

Yes, Of course. You need to save an info that your app did already pass the welcome window. For instance NSDefaults or Sqlite. It can be stored as a boolean value. Then you just ask for that value in the beginning to display or not display mentioned window.

Related

Get focus status out of application in Delphi

I'm trying to create an android-like keyboard in Delphi that appears when a textbox is in focus. I need to know some way to get this status of focus in all the programs so I can give a show in my form and send it forward
SetWinEventHook(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS, ...) to register for focus changes. Once you know the window you check the class name for "Edit" and you can get the thread id and then get caret information from GetGUIThreadInfo if you need that...

How to block entering a Gtk CellRendererText edit mode?

So basically what I'm trying to do here is to not allow entering of edit mode when there was a drag done. In a very brief way, click on celrenderer text = enter edit mode. drag = no edit mode. click meaning button press and release almost at same position. This could have been way easier if the celrenderertext was a widget but the way it is... I dont see how I could do something like that.
in the documentation I only see signals for when the diting is over or function which get the widget displayed in edit mode, etc... but I cant find something which could directly help me here.
Maybe somehow add an event box or something.
I'm specifically using gtkmm here.

Disable the X button on a message box

I'm working on a VBScript program, and I don't know how to disable the X button on a message box. Can you please help me?
Short answer: You basically can't. However...
If you use the VbOkOnly option or Popup function in place of MsgBox, when the user clicks on X this should be interpreted as clicking OK. The execution of the script will be continued.
Click here for more info..
As #Daniel Cook said, you could make an HTA as your message box. (Even though I haven't been using HTA for a while).

how to activate SysTreeView32 when folder-select dialog window is created?

When I create SHBrowseForFolderW dialog the default control is OK, what I need to do is make SysTreeView32 active so a user can right on use arrow keys to adjust the desired folder. I tried to use this code : http://comp.newsgroups.archived.at/os.ms-windows.programmer.win32/200505/05053122835.html which wokrs ok in finding the HWND of the dialog but using WM_NEXTDLGCTL has no effect on the window.
Maybe I should send TAB keystrokes to the window, or I don't know any other opions ? Are there swiches in creating the browse dialog what control will be highlighted when the window create ?
Ok, the thing is difference between PostMessage and SendMessage. I mistakenly used the later here. They are not the same!

Closing ASPxPopupControl and Reset Login Dialogs

I am creating a login usercontrol. I have added the following buttons: Recover Password, Change Password & Edit Profile.
I am using DevExpress's ASPxPopupControl to host the functions associated with those three buttons.
There are two problems
When the popup is opened I need to be able to close/hide it using a command button
When a user starts using one of the login controls and chooses to close the dialog the next time the dialog is opened it does not start at the beginning.
(e.g. Start the change password dialog, enter some information, close the popup; the information you started with is not cleared)
Any ideas?
Here is a link to help you with closing the popup on a keypress. You can use the Escape key as in this example or code your own.
http://www.devexpress.com/Support/Center/p/Q209168.aspx
For resetting the values, it appears this is manual.
http://www.devexpress.com/Support/Center/p/Q252942.aspx

Resources