Skip to main content

Posts

What is a QControl?

A QControl is an object-oriented alternative to using an XControl.  It allows a developer to create useful, highly customized User Interface (UI) components in LabVIEW of which the behavior is extensible and reusable. It is: A LabVIEW Object-Oriented Class with a Control Reference as part of its Private Data where all manipulation of the Control should be done through Properties and Methods of its Class A class that can be reused to recreate the UI Logic wherever required Could have an asynchronously called Event Hander that handles UI Logic Part of the QControl Class Hierarchy which mimics the VI Server Class Hierarchy Tradeoffs of a QControl vs an XControl There are tradeoffs to using a QControl versus using a regular XControl. A QControl has the same benefits of an XControl by: Encapsulating UI Logic Code Maintaining the same functionality when used in multiple instances Allowing for complicated UI code to be abstracted from other developers Allowing for
Recent posts

OrderSelection QControl

The  OrderSelection QControl Code  can be found here: OrderSelection QControl.zip The  QControl Toolkit  is required to use this and can be found  here : The QControl Toolkit on LabVIEW Tools Network Overview Here is another QControl I created to try to answer a question in the discussion board.  You can access the original question here . The requirement the OP of the question needed was a control that could help his application's user order a list of items.  This is quoted from his post: "I need a simple way for my users to be able to select and order a number of items... I would prefer to provide a larger iconic representation of the items and present them horizontally, since they will ultimately represent column headers in a data file. Drag and drop would of course be needed."  from @auspex So I decided to attempt a control like he described using the QControl Toolkit. Here is a view of what the OrderSelection QControl looks like but it

Steps QControl

This is the fourth in a series of posts on some of the extended QControls that come already installed with the QControl Toolkit.  There is no separate download for these.  To get them just install the QControl Tool Kit available here: The QControl Toolkit on LabVIEW Tools Network After installed, examples can be found in the NI Example Finder and the Controls (Facades) and the methods can be found in the Addons-->QControl Palettes. Overview The Steps QControl handles the pages in a Tab Control to aid in making step-by-step wizards.  It is used in the QControl Creation Wizard given as part of the QCtonrol Toolkit, shown below: In the Steps QControl Class there are three public methods: Goto Start Method - Enables the first page, disables all the other pages, and sets the Tab Control to the first page. Next Method - Enables the next page, disables all the other pages, and sets the Tab Control to the next page. Back Method - Enables the previous page, disables all t

LargeScrollbars QControl

This is the last in a series of posts on some of the extended QControls that come already installed with the QControl Toolkit.  There is no separate download for these.  To get them just install the QControl Tool Kit available here: The QControl Toolkit on LabVIEW Tools Network After installed, examples can be found in the NI Example Finder and the Controls (Facades) and the methods can be found in the Addons-->QControl Palettes. Overview The LargeScrollbar QControl operates just like a regular scrollbar except that, when using the included facades, is it large format for touchscreen control.  Pictured is a Multicolumn Listbox using two instances:  one for vertical and one for horizontal: The Scrollbars work by the main application using the Value Change Event on the slider in the facade and using the value to set the position of the String, Listbox, or in the example case, a Multicolumn Listbox. The gives that benefit that this code can be reused multiple w

RichTextBox QControl

The  RichTextBox QControl Code  can be found here: RichTextBox QControl.zip The  QControl Toolkit  is required to use this and can be found  here : The QControl Toolkit on LabVIEW Tools Network Overview For this QControl I wanted a completely LabVIEW Rich Text Box.  Under the hood it uses an HTML-like tagged string to define the formatting.  Then there are two main methods: one that converts the tagged string to the formatted string and one  that converts the  formatted  string to the tagged   string. This QControl contains two classes.  First, the RichTextBox Class inherits from the String Class and adds the ability read/write  through a property nodes: the tagged string  whether to view the tagged string value or the formatted value in the String Control Second, the RichTextBoxWithToolbar adds the Toolbar Facade and the Event Handler to handle all of the formatting events.  The font list is populated based on the OS and there is a case structure for that in

BreadcrumbNavigator QControl

The  BreadcrumbNavigator QControl Code  can be found here: BreadcrumbNavigator QControl.zip The  QControl Toolkit  is required to use this and can be found  here : The QControl Toolkit on LabVIEW Tools Network Overview For this QControl I had a need to mimic breadcrumb navigation similar to that found in a webpage.  This QControl modifies a string control to display the elements.  For those that don't know what breadcrumb navigation is, it is the history trail of where you have been (like Hansel and Gretel leaving a breadcrumb trail).   It allows the user to return to any given point. This QControl allows a developer to add items, change the delimiter (should be done at the start but default is the colon), and fires a user event when clicked so the user can handle the actual navigation. To add an element, don't write to the strings value; instead use the AddString Property.  The items will appear underlined just like a link on mouseover.  On mouse click a us

TreeSelection QControl

This is the third in a series of posts on some of the extended QControls that come already installed with the QControl Toolkit.  There is no separate download for these.  To get them just install the QControl Tool Kit available here: The QControl Toolkit on LabVIEW Tools Network Overview The TreeSelection QControl adds checkbox functionality to the basic tree control.  It is able to do this by controlling the symbol of each item; using an empty checkbox for false and a checked for true. There is an example in the Example Finder (shown below) when the toolkit is installed. There is other QControls that I have created that inherit from this QControl. They share the same Event Handler but override the Toggle Selection Method.  I will explain how this is done in subsequent post.

StatusHistory QControl

This is the second in a series of posts on some of the extended QControls that come already installed with the QControl Toolkit.  There is no separate download for these.  To get them just install the QControl Tool Kit available here: The QControl Toolkit on LabVIEW Tools Network After installed, examples can be found in the NI Example Finder and the Controls (Facades) and the methods can be found in the Addons-->QControl Palettes. Overview The StatusHistory QControl is a history stack which will display the last number of strings written to it.  The history size, colors, and direction are settable properties. The StatusHistory QControl is what I used in the New QControl Wizard to get the cool vanishing text effect.  There is an example in the Example Finder (shown below) when the toolkit is installed. Pictured here and in the New QControl Wizard I set the older strings in the stack to fade to the same color as my background to make the disappearing effect.  Ho