Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/27/2012 in all areas

  1. We often need to let our users select an item from a list. When it comes to making UI elements to achieve this that are a bit more sophisticated than a table, listbox or tree, LabVIEW's current capabilities leave a lot to be desired. Here's an alternative using HTML and CSS. The current example provides an interface for selecting an item from a thumbnail grid, similar to Windows Explorer. Run "Thumbnail Grid .NET Browser.vi" or "Thumbnail Grid ActiveX Browser.vi" from the attached code folder. The .NET version provides a cleaner interface as it provides a bit more control over its behavior. You can select any number of images and any size of the pane (read Web Browser control). You can set any thumbnails as disabled, which will appear grayed out. I have included some images for demo from the Open Icon Library. The code calculates the best grid pattern (the one with the smallest aspect ratio) and generates html code for displaying the images as a table and then generates CSS code for styling the elements. The web browser takes care of the visual effects and LabVIEW maps mouse cursor position to the calculated grid pattern for detecting the selected thumbnail. We could get fancier and use web services to trigger a selection, but that may be an overkill for this case. This approach can be extended to displaying dynamically created tabs or list boxes with bigger symbols than the current 16px limit for list box symbols. I will create examples of these over the next few days. The only issue I've noticed with this approach is that every time we change/refresh the browser, we hear the "Start Navigation" sound that is part of the Explorer shell. It may or may not be OK to disable that in all cases. I guess we can find a clean solution as we experiment more with this code. Thumbnail Grid.zip
    1 point
  2. I assume the numbers are coming across as ASCII "234"... This would make typecast the wrong primitive to use. You would want Decimal String to Number under the String -> String/Number Conversion pallet. I would also recommend using Match Pattern->Decimal String to Number->cluster instead.
    1 point
  3. This is more than secret stuff... it's super secret private special stuff! Seems it was a lot less secret 489 topics ago though... Thanks for your help!
    1 point
  4. Hah, I just checked the link...the LabVIEW Wiki INI token is wrong. It's close, but it's wrong. I would tell you the right one, but since I work for NI, it's secret.
    1 point
  5. I don't think there's a particularly good reason why these are private. I have filed CAR 380592 and CAR 380593 to see about getting them changed to public in a future LabVIEW version.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.