bjustice Posted August 18, 2021 Report Share Posted August 18, 2021 In many modern non-LabVIEW UIs, tables can be sorted by clicking on the header. There is then usually a glyph to communicate this feature. Non-LabVIEW example: I'm trying to reproduce this behavior in LabVIEW, but I keep hitting roadblocks. Notably: LabVIEW doesn't allow for symbols in table headers LabVIEW ascii table doesn't have any up or down arrows. There is an up carrot ^, but not a down carrot. I'd love to know if anyone has any suggestions or workarounds. Quote Link to comment
Neil Pate Posted August 18, 2021 Report Share Posted August 18, 2021 One simple (but mostly unsatisfying way) is to make it up out of other characters. \/ /\ For example see how it is done in VIPM. 1 Quote Link to comment
bjustice Posted August 18, 2021 Author Report Share Posted August 18, 2021 OOooo, I think I might have a solution. The font package "Symbols" has a bunch of symbols and arrows in it: This font package ships with Win 10, which is the only OS this product needs to run on right now, so that should work Quote Link to comment
Neil Pate Posted August 18, 2021 Report Share Posted August 18, 2021 Just be careful. Weird things sometimes happen when you change the font of just some of the text in a table. I recall trying to get some Greek characters into a table and header and I could not make it work properly. This was waaay back in 2010 so things might have changed. Please let us know if you get it working nicely! Quote Link to comment
bjustice Posted August 18, 2021 Author Report Share Posted August 18, 2021 Works! Quote Link to comment
bjustice Posted August 18, 2021 Author Report Share Posted August 18, 2021 Oh, really? Ok, I'll give this a try and report back any issues. If it doesn't work, I'll just go with your /\ idea, I didn't think of that Quote Link to comment
bjustice Posted August 18, 2021 Author Report Share Posted August 18, 2021 Argh, you're right, there is a limitation. It looks text properties (size, color, style, fontname) are global for each individual cell. i.e. I can't have a cell with both Segoe UI font and then also some text using Symbol font in the same cell. This means if I put Symbol arrows in a header cell, then I can't place descriptive text next to the arrow. Quote Link to comment
Neil Pate Posted August 18, 2021 Report Share Posted August 18, 2021 Yeah that sounds familiar. A terrible workaround would be to make a transparent button with your cool symbol on it and overlay it on the row header, and have it intercept the click event. I have to do crap like this so often in LabVIEW to get nice looking GUIs 😞 Quote Link to comment
hooovahh Posted August 18, 2021 Report Share Posted August 18, 2021 Yeah I've gone down issues like that in an attempt to make a better looking multicolumn listbox. In my case I wanted to have custom control options in my cells. Maybe have a Boolean cell that toggles from one color to another when clicked which is easy enough. But I also wanted drop downs for discrete cell values, numeric controls with increment decrement, color selection with a color box, and Tab and Return key navigation. It turned out okay in limited usages. But when you do things like resize a column, put it in a resizable pane, or subpanel, then lots more work was needed to ensure things looked normal. I suspect you can get away with a cool transparent boolean, that reads the column locations and moves it there. Just be sure and take into account the resizing nature, and hide the control when resizing or moving, then show it back once the resizing is done. Quote Link to comment
Tim_S Posted August 18, 2021 Report Share Posted August 18, 2021 The least painful way managed to do this was to detect the column header was clicked on then change the background color of the header appropriately. It's not great, but users understood what was going on once they were shown it. Quote Link to comment
bjustice Posted August 18, 2021 Author Report Share Posted August 18, 2021 I ended up copying VIPM verbatim: Use /\ and \/ Make the active column BOLD I agree that overlaid buttons are better and feasible, but would take alot of work to get correct with things like column resizing. The VIPM solution is low effort, robust, and not thaaat bad looking. Quote Link to comment
Mads Posted August 19, 2021 Report Share Posted August 19, 2021 (edited) If only NI could implement my second most popular idea on the idea exchange 😉 (please vote!). (Hopefully they can squeeze it in while working on my most popular idea/rant which partially covers this one anyway). Edited August 19, 2021 by Mads 2 Quote Link to comment
FantasticNerd Posted August 19, 2021 Report Share Posted August 19, 2021 3 hours ago, Mads said: If only NI could implement my second most popular idea on the idea exchange 😉 (please vote!). (Hopefully they can squeeze it in while working on my most popular idea/rant which partially covers this one anyway). You got mine 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.