QControl Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

The DSM Datagrid (yet another Datagrid QControl)

No worries!

I was just checking.
I really like the approach here over the other data grids that I've seen, so I wanted to be sure that this was the latest code/discussion related to this library.

Thanks!

0 Kudos
Message 11 of 20
(638 Views)

Oh,
You should consider uploading this to VIPM though.  It's super easy!
https://www.vipm.io/

Message 12 of 20
(636 Views)

Found a small bug!

 

It's kinda niche, but the Mouse Move event doesn't always get fired on the table border when your mouse leaves the table.

For this reason, it's possible that the "Handle mouse leave" method doesn't always get fired when your mouse leaves the table.

Easy fix: just need to add code to the Table.MouseLeave event to fire off the "Handle mouse leave" method

Message 13 of 20
(607 Views)

Ah, thanks for catching it! It needed a bit more code to make it work but I think this will do it- please let me know if's still iffy. The "Mouse Leave" event case unfortunately doesn't tell you from where the mouse left, so you have to keep track of that separately.

 

Unfortunately I upgraded to LV2023, so the new VIPB is 2023 only. To hopefully remedy that, I've also attached a backsaved Event Handler.vi with the new code in it so you can manually swap it. Apologies again for not having this on Github yet, which would make this a lot simpler. (Also, if you know of a way to get VIPM to spec a minimum version earlier than the currently installed version, please let me know.)

 

My only concern is that there would be a case when the Element.Mouse Leave method would be called twice for a given cell, but I'm pretty sure that won't happen.

Download All
Message 14 of 20
(596 Views)

Thanks!  I wasn't expecting a patch so fast, just sharing an observation.

 

Answering your question:
VIPM doesn't allow you to build for older versions.  But LV2023 is totally fine, and most people are constantly upgrading, so I never feel bad for releasing libraries using newer LabVIEW versions.

 

That being said, the LabVIEW 2024 beta is toying with the ability to edit and save VIs in their old version.  Something to keep an eye on!
https://forums.ni.com/t5/LabVIEW-Public-Beta-Program-in/New-Feature-Developing-a-LabVIEW-Project-in-...

 

Lastly, JKI just released Dragon, which boasts: "Dragon helps you open your LabVIEW project fast [and] always in the correct version of LabVIEW".  I haven't spent much time with it yet, but JKI products are always top-tier.

0 Kudos
Message 15 of 20
(580 Views)

Glad I could help 🙂 Honestly, having someone else take a look at the code for some issues is quite nice. You stare at code for long enough, simple things like this one simply go unnoticed. One bug I haven't been able to reproduce reliably, let alone fix, is that SOMETIMES, the popup is in the wrong place. Usually it's just the Y position that's off, not the X, which is odd. It seems to be related to the first time it launches, but I'm not certain. I have a suspicion it has to do with an uninitialized shift register/feedback node somewhere, which I know I didn't thoroughly debug when I first wrote this. It could also be a "first call?" kind of situation, as I think it happens the FIRST time you click something after launching more often than it does in subsequent clicks. If you happen to be able to reproduce it, please post here so I can try to fix it.

 

Regarding 2023, I know many people update frequently, but I also know there are lots of folks who are under IT restrictions that only let them upgrade every so often, so I like to post in the earliest version I can to make sure everyone can use it. There is probably a way to run a "Save for previous version" then build the VIPM off of that, but it's a pretty manual process, and so far no one has asked so I don't have much incentive to do it 🙂

0 Kudos
Message 16 of 20
(573 Views)

Sure thing!  If I find any other issues like the pop-up positioning, I'll be sure to post here and let you know.

I've been using this code as a starting point for myself, and then making edits.

Like I said, I really like the approach being taken here over other data grids that I've seen.

I'm also trying to use this not only for user strictly-typed data entry, but also for real-time commanding.

I worked to make the bool cell feel more like a push-button with a few updates:

  • hover-over color = light grey
  • mouse-down color = blue
  • command only sent on mouse-up within the same cell
  • pointer finger cursor
  • dark-mode for the rest of the cells.  (Required that I take back control of font color from the disabled logic.)

I'm not sure if GIFs work here, but we'll try:

 

2024-02-21_11-08-01.gif

0 Kudos
Message 17 of 20
(570 Views)

Oh, I like those a lot. Did you modify the Boolean element or make a child? And did you need to modify anything other than the Boolean element itself to make it work?

 

If you'd like to post it I will fold it into the main Boolean control, which I fully admit isn't the best UI-wise since you kinda can't tell it's a Boolean already.

0 Kudos
Message 18 of 20
(561 Views)

I don't have the code in a share-friendly state right now, but answering your questions:

  • I modified the boolean element directly.  Although, to be fair, I've turned it from a boolean toggle button into a boolean push-button, which probably deserve its own class since it's a different type of thing.
  • I had to add "handle mouse up" events for cells, to handle the mouse up action on the cell.  I wanted the button to send command on mouse up, not on mouse down, which makes it feel just a tad bit more like a real push button.

It was pretty easy to add these things given the framework

 

0 Kudos
Message 19 of 20
(554 Views)

I added a new feature today- you can now modify the scroll wheel behavior using the method "Set scrolling mode". You can set it to Default (LabVIEW maintains control), Locked (no scrolling), and "Displayed items only", where the scrolling stops when the user hits the bottom of the list. Normally, LabVIEW will let you keep scrolling into no-mans-land, but this will stop it!

 

(Note, this currently only works with the scroll wheel, not clicking the scroll buttons. You will need to remove the actual scrollbar and add a separate scrollbar control if you want to limit range that way. This is due to LabVIEW not having any way to filter "scroll button" events.)

 

On a positive note, I think I've made some progress into getting this on Github- no promises, but I think I'll be able to get it published there. Once I do that, I'll get it on VIPM as well.

 

As always, I'd really appreciate any feedback you might have!

Message 20 of 20
(195 Views)