Jump to content

One and two button dialogs that stay out of the root loop


Recommended Posts

Before I totally reinvent the wheel, has anyone created replacements for the one and two button dialogs that do not block the root loop in LabVIEW?

The main features I would need them to have are:

Ability to resize to fit message and button texts, like the originals do.

Reentrant (so one does not block another, in case many threads want to call this at the same time, and yes I know this might not always make sense.)

Centers itself on the active calling window (and not the screen, like the 3 button dialog does)

Does NOT block the root loop!

I can almost do this with the 3 button dialog, but it centers itself on the screen and is not reentrant.

thanks!

-John

Link to comment

QUOTE (jlokanis @ Sep 12 2008, 08:57 AM)

Before I totally reinvent the wheel, has anyone created replacements for the one and two button dialogs that do not block the root loop in LabVIEW?

The main features I would need them to have are:

Ability to resize to fit message and button texts, like the originals do.

Reentrant (so one does not block another, in case many threads want to call this at the same time, and yes I know this might not always make sense.)

Centers itself on the active calling window (and not the screen, like the 3 button dialog does)

Does NOT block the root loop!

I can almost do this with the 3 button dialog, but it centers itself on the screen and is not reentrant.

thanks!

-John

PJM had a post with a blog reference that did the text/button changes.

Whether it fits the other requirements?

I think it came up in the - Sequence structure is bad / Invent the new dialog challenge - series of posts.

Worth asking him/checking out.

Cheers

JG

Link to comment

Well, I managed to get the 3 button dialog to do most of this by modifing the source code. I ended up changing the server call to center the window to instad call a subvi that takes the call chain and searches it for the nearest parent with an open window and then centers itself inside that window. This is as close as I can get to what the system dialogs do.

Looking forward to the refactoring of the 3 button dialog by the coding challenge, if anyone has time to do it. If you want to add my little trick, let me know and I will post the VI.

-John

Link to comment

QUOTE (jlokanis @ Sep 12 2008, 06:21 PM)

Well, I managed to get the 3 button dialog to do most of this by modifing the source code. I ended up changing the server call to center the window to instad call a subvi that takes the call chain and searches it for the nearest parent with an open window and then centers itself inside that window. This is as close as I can get to what the system dialogs do.

Looking forward to the refactoring of the 3 button dialog by the coding challenge, if anyone has time to do it. If you want to add my little trick, let me know and I will post the VI.

-John

Sounds like a nice trick -- why not just post it?

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.