Cat Posted September 21, 2009 Report Share Posted September 21, 2009 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 Quote Link to comment
Grampa_of_Oliva_n_Eden Posted September 21, 2009 Report Share Posted September 21, 2009 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 1 Quote Link to comment
TobyD Posted September 21, 2009 Report Share Posted September 21, 2009 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. Quote Link to comment
Grampa_of_Oliva_n_Eden Posted September 21, 2009 Report Share Posted September 21, 2009 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. If you start with the frameless version from the classic palette your work is reduced. Ben 1 Quote Link to comment
Cat Posted September 21, 2009 Author Report Share Posted September 21, 2009 pop-up Advanced >>> customize Go to tweazer mode and re-size. Thanks, Ben! I haven't had any reason to customize a control in years and completely forgot about that. 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.