Jump to content

graastein

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Posts posted by graastein

  1. Some further info:

    Rather than "manually" getting a reference to all those controls, you might want to look into using the "Controls[]" property for your VI's front panel:

    Of course, since you probably don't want to disable everything, you'll need some logic around when to write a "2" and when to write a "0".

    Also, it's probably more efficient to get all the references at startup, and store them in a shift register or something, rather than building your great big array every time the event fires.

    Good luck,

    Jaegen

    I actually knew this, but I did not think about a way not to disable all controls. But that was not very difficult to do.

    This is my new code, a lot cleaner ;)

    post-3560-1164135344.png?width=400

    (Made infotext for newbies like myself.)

  2. You should be able to associate the extension with your application through Windows Explorer (right click the file and select Open and then select your executable). I haven't done any detecting of the opened file like this, but this might help you.

    Thanks for your reply.

    Yes I know about this, but how does I then load the clicked file into my application? Usualy I use the file dialog for this.

    Should be an Event that was called: "If application is called by a file." :)

  3. The problem is that you have to set the selection in order to set color.

    After the loop is done, set the text selection to the next write position.

    If you are going to edit a lot of text, you will have to come up with a clever scheme to reduce updates, timing maybe?

    Download File:post-5958-1159980405.vi

    /J

    Yes, maybe something like a countdown after each value change before updating, and each new valuechange resets the countdown.

  4. Hi,

    I just took a quick look at your solution, and I think you can make this even easier.

    1. Enable "Replace All" option and skip the loop.

    2. remove the \ to cancel special interpretation of / (at the beginning and at the end of the search string)

    I made a quick implementation to colorize your comments, to give you an idea how it can be done.

    Hope it works :blink:

    Download File:post-5958-1159977170.vi

    /J

    Edit: I updated the attachment so that it is saved in LV8 instead of LV8.20, sorry...

    Fantastic :thumbup: yes that made my code easier :)

    Your color the comments vi worked great when run once, but I'm aiming at updating the colouring when typing.

    Maybe an event structure is the way to go.

    But as you see in my attachment it constantly marks all the text, and then the user deletes what he has already typed in.

    Download File:post-3560-1159979520.vi

  5. Hello

    Is it possible to remove the comment like the one on the screenshot? Remove everything from /* untiltil */

    I'm going to use the text to run a state machine. And also let the user make comments in the "code"

    post-3560-1159888534.png?width=400

    And a second question: It it possible to color the comment when viewed on the screen? Like on the second screenshot? (The text in green)

    post-3560-1159888545.png?width=400

  6. Well I do like a challenge. At first I didn't care that the image didn't shift. But you threw down the guantlet... As others have mentioned you do start out with a new push button control. Open it in the control editor, then save it. Create another new control editor to put a system button into. Copy each picture item state from the system button to the push button. Then create a picture that you want to serve as part of your button, with a true and a false state. Copy to the clipboard the false state, then import it into the light part of the former push button. Import the true state into the true state of the light part of the push button and vola! you have a system control that also has an icon.

    I wonder if you can change the icon part programattically thru scripting? :ninja: ;)

    Fantastic stuff :D

    Just what I was looking for. You rock :wub:

  7. Chris, as I'm the guy who created the original "master" button, I think I can help out a little... I'm not going to give away the secret just yet. I find it interesting to see everyone trying to figure it out. You are so very close with the decal concept, however, as you can see, when you click on the image, it doesn't shift down and to the right as in VIPM. Keep trying :)

    I searched for decal in help, and found you could import graphics to true and false state. :

    Right-click the Boolean control or indicator, select Import Picture from Clipboard from the shortcut menu, and select among the following items:

    False

  8. That's because you're just pasting an image into the control's background or, if you're unlucky, the foreground, and not into one of the states.

    Just wondering, in the WindowsXP-world, do these kind of buttons actually exist?

    So, buttons with an icon, which change style going from Luna to Silver to Classic?

    Yes it does exist. Internet Explorer is one example. (Stop button etc.)

  9. You can just customize the control and paste your images.

    Put a system boolean on your FP, then right click, point to 'advanced', then click 'customize'.

    Click on the little wrench just below "view' in the control editor's menu, to change to "customize mode" (you start in 'edit mode' by default; the wrench changes to tweazers)

    If you right click on the button now, and point to 'picture item', a menu expands with 6 items on it, corresponding to the various button states. Normal LV booleans only have 4 images (true state, false state, both transition states). The system button has two extra for two 'mouse-over' states.

    You can select a picture item, copy it to the clipboard and edit it in whatever you use to edit icons, copy it and then paste it back into the image.

    post-3523-1158936520.jpg?width=400

    Ok great :)

    Does this become an "almost system button", or a true system button?

    When I change the images would it not stay like this om mac, linux and the new Vista? They all get the XP system button?

  10. Hello

    I measure a signal with a DAQ card, this signal is troubled with noise. Not much, but enough to make trouble.

    Example:

    I get this value into LabVIEW: 5.45012. How can I change this into this : 5.4 in the Block Diagram? A block that drops the least significant decimals.

    This is easy when I'm displaying the value; just edit it in Format and Precision in the indicator.

    Is there a block that does the same thing?

    Sorry for my poor English.

×
×
  • Create New...

Important Information

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