Jump to content

Need a smaller color box


Cat

Recommended Posts

I am modifying Color Table Generator.vi (in intgraph.llb) to create a color ramp for an intensity graph. Color Table Generator.vi creates a very nice view of what the color ramp is going to look like, however, it is positioned horizontally. I want to change the color box array so it runs vertically (like the actual color ramp of the graph). That's the easy part.

The horizontal color box array has array elements that are only 2 pixels wide. This is in order to fit all 256 elements in the little window. But when I make the array vertical, I can't seem to make the color box elements any smaller than 5 pixels (width or height). I discovered the property ArrElem.Bounds isn't settable during runtime, so that didn't help. So I thought I would make a color box of the right dimensions and pop it in the array. But while ColorAreaSize is settable during runtime, if I set it to 2 pixels (for example) and then read it back, it still gets no smaller than 5 pixels.

Obviously somebody at some point created a color box with a dimension smaller than 5 pixels, so it must be possible. But I've run out of obvious things to try. Any suggestions?

Cat

Link to comment

I am modifying Color Table Generator.vi (in intgraph.llb) to create a color ramp for an intensity graph. Color Table Generator.vi creates a very nice view of what the color ramp is going to look like, however, it is positioned horizontally. I want to change the color box array so it runs vertically (like the actual color ramp of the graph). That's the easy part.

The horizontal color box array has array elements that are only 2 pixels wide. This is in order to fit all 256 elements in the little window. But when I make the array vertical, I can't seem to make the color box elements any smaller than 5 pixels (width or height). I discovered the property ArrElem.Bounds isn't settable during runtime, so that didn't help. So I thought I would make a color box of the right dimensions and pop it in the array. But while ColorAreaSize is settable during runtime, if I set it to 2 pixels (for example) and then read it back, it still gets no smaller than 5 pixels.

Obviously somebody at some point created a color box with a dimension smaller than 5 pixels, so it must be possible. But I've run out of obvious things to try. Any suggestions?

Cat

pop-up Advanced >>> customize

Go to tweazer mode and re-size.

Ben

  • Like 1
Link to comment

Obviously somebody at some point created a color box with a dimension smaller than 5 pixels, so it must be possible. But I've run out of obvious things to try. Any suggestions?

I was able to create a color box 1 pixel high in LV 8.6.1.

1. Right click the colorbox and go to advanced-->customize.

2. Click the wrench icon in the toolbar so you can manipulate individual components.

3. Remove the color box from the frame

4. Resize the frame by clicking the corner and dragging (I set mine to 1x1 pixel)

5. Resize the colorbox by clicking the corner and dragging (I set mine to 1x48 pixels)

6. Move the colorbox over the top of the frame so the frame is hidden.

7. Exit and save the control.

If you add it to an array, this is what it looks like (I threw some random colors in there so you can see the effect.

post-8758-125354291203_thumb.png

Link to comment

I was able to create a color box 1 pixel high in LV 8.6.1.

1. Right click the colorbox and go to advanced-->customize.

2. Click the wrench icon in the toolbar so you can manipulate individual components.

3. Remove the color box from the frame

4. Resize the frame by clicking the corner and dragging (I set mine to 1x1 pixel)

5. Resize the colorbox by clicking the corner and dragging (I set mine to 1x48 pixels)

6. Move the colorbox over the top of the frame so the frame is hidden.

7. Exit and save the control.

If you add it to an array, this is what it looks like (I threw some random colors in there so you can see the effect.

post-8758-125354291203_thumb.png

If you start with the frameless version from the classic palette your work is reduced.

Ben

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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