05-25-2023 10:01 PM
hi,
I am trying to use the scrollbar of the IMAQ display control, but I found that the scrollbar only can be used by click and hold the scrollbar. And then I want to modify some properties of such scrollbars, like position and size, but I finally found that I can not change these properties.
I want to change scrollbar's position by scroll the mouse, I need your help.
Thanks for any help!
Kawhi
05-26-2023 02:12 AM
The IMAQ control is basically 'as is', and there's little you can do about it's behavior.
If you want a scrollbar with custom behavior, you can use a scrollbar control and catch it's events. On events, change the origin of the IMAQ image.
05-28-2023 09:31 PM
Thanks for your kind reply!
As you said, the IMAQ controls are basic, I can do little about change properties of IMAQs, is there another advanced solution for image shows?
Looking forward to your reply!
05-30-2023 03:59 AM
@kawhi wrote:As you said, the IMAQ controls are basic, I can do little about change properties of IMAQs,
Basic isn't really how to describe them/. They are pretty advanced controls. They are very limited in how they can be customized.
@kawhi wrote:
is there another advanced solution for image shows?
Sort of.
You can convert to a picture control (pixmap).
This will be relatively slow though.
And while this allows you to make the control behave as you want (to some extend), you will have to make everything you want it to do.
I'd see if you can hide the IMAQ scrollbar, and use your own scrollbar(s). Catch events of the scrollbar, and change the origin accordingly.
The terminology of the scrollbar properties are a bit tricky, but you don't need a lot of code to link a scrollbar to another control. It just needs to be just right 😉. Of course you'd need an event structure, and that could be a massive change if you don't already have one in your architecture.