Jump to content

non-modal dialog box


sydney

Recommended Posts

I have a project with a producer-consumer pattern where the producer queues msgs to the consumer via an event structure and a msg queue. The consumer is also a FSM (state machine). I need to add a non-modal dialog box to the GUI so that I can recognize the events from the main GUI as well as the non-modal dialog box. I already have added modal dialog boxes which run OK, but, since they are modal, only the dialog box will receive events until I close the box. I also need to have the ability to hide or minimize the box while I work with the main GUI since I plan on this dialog box showing a list of items that the user will need to see while using the main GUI. If I bring up the non-modal dialog box in the producer event structure, I'll lock out all other events. If I do this in the consumer I'll run into other problems with the existing GUI. What I think I have to do is try to run this in another thread initiated from the event structure, but I have not yet figured out how to do this. I would love to hear some ideas on this one... In the meanwhile I'll be experimenting and checking the examples for more insight.

Link to comment

The most simple way would probably make another consumer loop for showing your non-modal dialog boxes. Have another queue (or notifier) running around to tell the loop to run a certain window. You would be limited to one dialog box opening in the new consumer, but it is a quick and easy way to handle your issue.

  • Like 1
Link to comment

I did some experimenting around and found the following things had to be done after using you separate loop/ msg queue idea. I had to make a custom VI that was neither modal or free floating since I wanted the minimize icon to be used. I also had to implement a 'Singleton' pattern idea even though I am not using OOP so that the button event to bring this up will only ever bring one VI up. Then I discovered that the 'look and feel' needed another fix up so that the button event would reopen the front panel via a property node when the event was generated and the VI was in minimized state. Works great! thanks for the pointer.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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