JDave Posted July 3, 2009 Report Share Posted July 3, 2009 Name: Type Sensitive Popup Submitter: LAVA 1.0 Content Submitted: 02 Jul 2009 File Updated: 04 Jul 2009 Category: User Interface LabVIEW Version: 8.2 Version: 1.0.1 License Type: BSD (Most common) Potentially make this available on the VI Package Network?: Undecided Copyright © 2007, David Saunders All rights reserved. Author: David Saunders --see readme file for contact information. Description: Provides an intuitive interface for tabular controls containing multiple data types. Users can use various controls and datatypes. Users can also use provided functions for registering and looking up type parameters by control (as well as by column, row, or cell). When you click on a cell, a correctly positioned and sized popup appears allowing for a controlled and intuitive input. Appears like it is a built-in feature, not an annoying popup window. Features: - Supports tables, listboxes, multicolumn listboxes, trees, and string controls. - Implements many data types : string, integer, float, color, ring, boolean, captioned string, etc. - Can use multiple tabular controls in same program with no programming changes - Can pre-register controls with certain data types - Register the entire control, or columns, rows, and cells. - Can edit the registered data type by registering again at any time - Allows for different font sizes - Works even on modal windows Instructions: Run the Demo program to see example usage. To recreate -- 1. Drop 'TSPopup.Popup Cluster.ctl' anywhere on your front panel. 2. Create program logic, similar to the demo MANDATORY elements a. TSPopup.Initialize.vi (register for the user event in your event structure) b. TSPopup.Lookup.vi (returns positioning information, looks up any registered controls) c. TSPopup.Show Popup.vi (called in a Mouse Down? event case) d. an event case for the user event output from (a.) e. TSPopup.Close.vi (called at end of program) OPTIONAL elements f. TSPopup.Register.vi (register controls with popup type parameters) g. TSPopup.Update Cell String.vi (provided to show how to change the cell string after popup is completed) 3. Bring the Popup Cluster to the front on the front panel. Otherwise the popup will show up behind some of the other controls on your User Interface. Limitations: - Can't programmatically bring popup cluster to front. Must do this manually. Change Log: 1.0.0: Initial release of the code. 1.0.1: Added another demo using dynamically changing data types in a tree Removed LV version specific event handling (only dealt with LV 7.1) Fixed bug where headers defaulted to have same type as their column/row Fixed cluster scanning from text Fixed ring to default to index 0 if string unrecognized Changed the background event monitor to always be hidden Click here to download this file 1 Link to comment
battler Posted September 29, 2009 Report Share Posted September 29, 2009 Hi David, Great VIs! I'm trying to modify to include a Cluster pop-up with 3 inputs. I'm having trouble. I tried modifying your Popup Cluster type definition but it's not working. Can you please briefly explain how this can be done. Appreciate it. Battler. Link to comment
battler Posted January 12, 2010 Report Share Posted January 12, 2010 Hi David, I've built an application using the Type Sensitive Popup VIs you've provided. When I build an exe out of your Demo (and my VIs) they do not seem to work. The pop-up occurs but the VIs do not update the cell and your VIs freeze the program. Your help would be greatly appreciated. Please try to build an exe out of your Demo. Cheers. Link to comment
Yair Posted January 12, 2010 Report Share Posted January 12, 2010 As I mentioned in the NI forums post, the library includes some VIs which are called dynamically and need to be explicitly included in the EXE. Link to comment
Sergey Kolbunov Posted November 10, 2010 Report Share Posted November 10, 2010 One drawback I found in the code: TSPopup.Update Cell String.vi uses Replace Array Subset primitive to update Listboxes, MCListboxes and Tables. That makes impossible to insert new rows into control. Says, if the control doesn't have any data initially, then popups appears and allows to select/type a value, but the control is not updated. Link to comment
klessm1 Posted January 11, 2012 Report Share Posted January 11, 2012 Great API. Couple comments and suggestions. I was using a couple of panes in my application and so the locations got a little messed up. I modified it so it could register pane mouse down events instead of vi mouse down and it works pretty good. Although I don't have a current need I noticed that you can't register multiple controls on the same window or in two windows that are up at the same time. Finally it seems to take a little bit of time to load because it is using vi server. I am using it on some popup windows and when I switch between step interfaces quickly it is a bit noticable (not really bad, but should be almost instant). I tracked it down to the init call where it launches the vi dynamically. Possible update could be to run as a daemon?? It could solve the time to load and the multi-control / window open at the same time. Link to comment
Fab Posted September 28, 2017 Report Share Posted September 28, 2017 I know this is an old post, but just in case someone else tries this code... I just downloaded the code and the TSPopu.FG.Poup.vi was broken, I made a minor modification in the Show case to have the event registration pass through (I don't think the Generate User Event.vi does anything to the reference itself. The code seems to work fine after this change. 2 Link to comment
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now