UI Interest Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

An Extensible, Object-Oriented Alternative to XControls

Frustrating that I loaded the Q Controls toolkit in Labview 2015 but couldn't load the DataGrid because it was made for 2018. I also have labview 2017 but I can't use it because I would have to update runtime engines on nearly 40 computers. So, I'm sticking with 2015 for now. This is at work. If I install the latest version 2019 can I save as a previous version to 2015?

 

0 Kudos
Message 41 of 58
(3,162 Views)

There are two parts to the DataGrid, the right-click menu plugin stuff that controls the configuration dialog and the actual QControl code.  Both would have to be converted to LabVIEW 2015.  I have been trying to build a VI Package (VIP) of the Data Grid Configuration that I back saved for LabVIEW 2015 with no luck.  VIPM keeps having an error while building but I'll keep trying.  The configuration stuff needs to be installed first before using the QControl.

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 42 of 58
(3,141 Views)

Thank you for the nice work. I  was looking for C# user control equivalent in LabVIEW and found this QControl kit. I was able to use to create my own fist QControl and make it work 90%. However, I could not make my QControl accept user "key down?" event. Below is a screen capture of Event Hanlder.vi with "Key Down?" case that does not work. In addition, it it possible to enable QControl to accept mouse "left button double click" event?

 

xub_0-1597980423026.png

 

 

 

0 Kudos
Message 43 of 58
(3,105 Views)

The Key Down event works for me.  Attached is a quick version of a test QControl using the Key Down event to put the pressed ASCII letter in a popup dialog. 

 

My guess is that you have something else broken that is making your QControl not operate.  If possible attach your code as a zip file and I'll see if I can help.

 

Here is a screenshot of my Event Handler.

 

TheQ_0-1597982149622.png

 

 

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 44 of 58
(3,101 Views)

Thank you for your attention. Unfortunately, your project cannot be opened in my LabVIEW 2019. Could you resave it in LV2019?

 

Attached please find the simple user control I am working on. It is a cluster consisting of two strings and a Combo box. When press "Ctrl+Shift +Q", I want to reset Combo box control. Another question, is it needed to close all references to individual controls in the cluster when close the user control?

0 Kudos
Message 45 of 58
(3,093 Views)

So I found the problem.  The cluster usually doesn't have or get the key focus.  Instead, it's one of the controls inside that have the key focus.  If you press tab in your tester until the cluster is highlighted and then pressed the keys, it works.  In the Event Handler, I added the "Key Down?" event to the other controls so that if they have the key focus it works too.  I then discard the Key Down if the keys were pressed so that it doesn't type anything.  The fixed version is attached.  (I made sure to keep your QControl in LabVIEW 2019.)  Hope this helps.

 

TheQ_0-1598053807790.png

 

To answer your other question, you do not need to close references to individual controls or indicators.  LabVIEW does that for you when the VI leaves memory. (https://forums.ni.com/t5/LabVIEW/Which-references-need-to-be-quot-Closed-quot/m-p/307552/highlight/t...).  You do not need to close anything that inherits GObject in the VI Server Class Hierarchy and this includes all controls (see https://labviewwiki.org/wiki/VI_Server_Class_Hierarchy and https://labviewwiki.org/wiki/GObject_class).

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



Message 46 of 58
(3,084 Views)

Thank you for the solution and the hint. You are the man!

 

Now I add mouse up event to get key focus of the cluster and it works as I wanted.

0 Kudos
Message 47 of 58
(3,080 Views)

I have a follow up question about the example SysInfoUserControl.zip ‏196 KB you help modified. When closing the Test_SysInfoUserCtrl.vi in the example, DETT reports reference leak in Launch Event handler.vi. BTW, I was able to fix the other memory leak in the other VI highlighted in yellow.

 

xub_0-1598906774068.png

 

0 Kudos
Message 48 of 58
(3,033 Views)

That reference leak is on purpose.  The "Event Handler.vi" is launched in the same manner that the "Actor Core.vi" is in the Actor Framework.  It will only have one reference leak which by doing so allows launching to be a lot faster.

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 49 of 58
(3,026 Views)

If I leave the program running for a long time, will this memory leak becomes a concern at all? I had thought memory leak is no good.

 

May I ask the slow way that causes no memory leak? The event handler can be launched asynchronously and stopped by a registered user event. Is this the approach used by AF you are referring to? Could you explain more about the mechanism?

0 Kudos
Message 50 of 58
(3,021 Views)