Jump to content

Ravi Beniwal

Members
  • Posts

    97
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Ravi Beniwal

  1. Is that how LabVIEW closes the palettes?

     

    It is not practical to put the burden on every VI that has an open window for announcing the "active window" state to any random floating window. We could get a list of all VIs with open FPs and let the floating window register for a mouse down event or periodically cycle through the open windows to see if any of them changed their active state. But it will take a while to get all VIs in memory, open references to each one of them and see if their FP is open. We will have to do this every time the floating is opened.

     

    Is their a trick to quickly get a list of all VIs with open FPs or will that have to be a feature suggestion?

  2. You also need to configure the VI Properties >> Appearance page to be a floating window if you want the "don't take key focus when interacted with" behavior that the LV palettes have.

    How do you determine that it is time for this floating window to close because the user clicked on the host or any other window, just like the LV palettes? For a floating window, we can't check for "is foremost" to see if some user action made this window NOT Foremost.

  3. Sure.

    One way to do this is by using user events. So the VI with the on screen keyboard creates a user event that any other VI can register for. The keyboard VI will get the user input by looking for value change on the keyboard buttons. If the user uses the physical keyboard, you could use the key down event to read the key stroke (and briefly depress the corresponding key on your virtual keyboard). In either case, since you know which key the user intended to press, you can fire the user event with the details. Any other VI can register for and get this user event.

  4. Can you divulge a bit more about your architecture? How are the messages consumed? Are you planning to "read" the command from the message class and then run some code in a case structure or do you want to use some form of dynamic dispatching within your DUT class hierarchy?

  5. Here are the VIs saved for 2009.

    Please note that this is just a quick example to show the functionality, which is why the KeyLogger is launching VI1 (and is only displaying the keystrokes and not logging them). For your real KeyLogger, you will need to use some methods to find out which VIs are in memory and open references to them (may be register for events if the FP is open). You could use "Application:All VIs in Memory" property every now and then to see if new VIs have been launched.

    KeyLogger.vi

    VI1.vi

  6. Hi hooovahh, thanks for adding the test cases.

    I did test resize event handling and then noticed the same issues that you did. Since we are generating a new html document and loading it in the browser every time the size changes, it was really slow and the clicks were annoying.

    For handling panel resize event, while still doing most of this stuff in LabVIEW, I would rather refresh in a separate loop and use lossy enqueue to a single element queue to pass on the panel resize message so that we don't refresh for every single resize event LabVIEW fires. Ideally, we should resize the thumbnails using JavaScript onresize event and calculate the thumbnail sizes within JavaScript, not in LabVIEW. Yair has lots of munitions on that. May be we can put together a quick example.

  7. 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.

    post-9308-0-38048500-1353773930.png

    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

    • Like 1
  8. Why don't you just use the PlotImage.Front property?

    Because Mark was "trying to create a semi transparent floating line independent of the SFP that the operator can move anywhere on the screen."

    Plot images are great, but for using the plot image, you'd have to plot the data in that graph and not in just any independent window. Also, you'd still need a way to drag around the green line.

  9. It happens only when I enable multiple instances of my exe using the "allowmultipleinstances=true" attribute in the INI file.

    If I allow only a single instance, all file open messages from the OS show up in the instance of the application that I have open. So now I have an event structure with the "OS Open Document" and a "Timeout" in my main event structure's Timeout case. For what it is worth, it is working fine.

  10. Since you are open for a .NET solution I am guessing the Windows API solution would also be ok. Combine Ton's example with tst/Yair's example here:

    http://forums.ni.com.../352929#M179807

    Create a VI with a white background and a green object (2D picture with transparent frame for example) with the desired size (10 px height). Windows will remove the remaining white area from the FP and leave a semi-transparent green bar. Here it is on my Win7 machine:

    Dragging is a bit finicky with Ton's example, I may play with it a bit. I have had similar issues trying to fake a title bar in a window.

    Here's a solution to fix the finicky dragging. Instead of trying to make the window a certain size and dragging it around, just drop a graph control and make everything transparent, but leave a green cursor. The image below shows the cursor overlaid over an Excel graph.

    post-9308-0-30970900-1335237601_thumb.pn

    The cursor makes the dragging really smooth. If the graph is set to fit to pane and the window set to maximized, I think you'll get the behavior you are looking for.

    • Like 1
  11. Did you select 50-60 associated files and try to open them all at once? On a related note, I know that Win7 won't let you "multi-open" over a certain limit (which is pretty annoying sometimes).

    Sorry about the lack of clarity in the earlier post. I tried to open only 1 file. If I had selected 50-60 files, tried to open them and the OS opened them, that would be the intended behavior that one wouldn't complain about.

  12. I've done something like this with a table control and a ring. When the user clicks on a cell in the table (or tabs to it), I populate the ring with the appropriate set of values, then move it on top of that cell. When that cell loses focus, copy the text from the ring into the cell in the table and hide the ring control (or move it to the next cell). It takes a bit of work, and the interface isn't perfect (you have to click twice in the table cell to select a value: once to get the ring there, the second time to pop it down) but it looks pretty good and works well. I like to fill the entire table with something like "Select..." and also have that as the first value in the ring so it's clear that the user can select a value, and when moving back to a cell that has previously been set I make sure to set the ring control to the matching value before moving it into place.

    You won't need to click twice to change the value if you position the ring on mouse move rather than mouse click. You can track the mouse and re-position the ring only when the cell changes. If the ring appears on a cell on "mouse over", it will give the user a hint that he can click on it to select a value from a list.

×
×
  • Create New...

Important Information

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