Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with enumerated image widget
#1
I have tried to use the variable enumerated image widget to change the position of an image on the screen. I define a set of image names depending on the value of the GVar with no problem. If I attach a separate image to each name, then it works and I can select one of the set.

Now for each image name, you can move the position sliders to move it relative to the centre of the widget. Great I thought, I can use the same image for each name, but with different horizontal offsets, Then by switching from one name to another, I can change the position of the image.

This does not work, as while it is possible to set a different displacement, and it is saved in the widget, it has no effect. This looks like a bug since if you can set the values, then the widget should display them. If only one displacement is allowed for all images, then the setting bars should be greyed out so that you cannot try to set different vales.

At the moment I have a work around by physical creating left, right and center versions of each image on a transparent background so that by selecting one of them it will appear to make the image move to the left or right of the center.

As an alternative, would it be possible to use a static image widget, but expose the vertical and horizontal displacements as back door parameters that could be changed in an action command.

PJG
Reply
#2
AFAIK it does use the offsets. And I just tested it and it does. It is the case that the designer, while doing the design, displays the first image. So you will only see changes you make to the first image. Selecting it in the Images tab doesn't make the actual display to change. it just lets you change the settings of the selected image. But you can move the sliders for each image once you have selected an image for that slot, and they do get used during actual viewing.
Dean Roddey
Explorans limites defectum
Reply
#3
Well I must not be doing things correctly. Here is a template with a single Variable Mapped Image widget. It is controlled by GVar:ImagePos and has a single image in three different positions, The image does not move when you change the GVar value. I have attached the template.

PJG


Attached Files
.cqctmplpack   MoveImageTest.CQCTmplPack (Size: 34.96 KB / Downloads: 2)
Reply
#4
OK, you are correct. It worked for me because, when you said enumerated image, I didn't stop to think that there really isn't an variable based enumerated image. Instead, those use the mapped image, because the variable won't exist until the template is viewed. So it needs the mappings in order to know what images to create. So I created a field based enum image, since it was more convenient to test, on the assumption that if it worked for the field type it would work for the variable type.

But, anyhoo, the mapped image widget was not honoring the offsets, so I added that. It'll be in the 4.7.1 refresh I'll do here very soon.
Dean Roddey
Explorans limites defectum
Reply
#5
Thanks Dean

PJG
Reply
#6
I posted a 4.7.1 preview link in the beta discussions thread. Give it a try to make sure it fixes your issue before I post it.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem Moving CQC to new Computer kblagron 12 961 02-17-2022, 09:39 PM
Last Post: kblagron
  URL vs WebURL in Camera Widget gReatAutomation 1 784 12-31-2020, 08:36 AM
Last Post: Dean Roddey
  Camera Widget - URL, WebURL and Viewing While Not on Local network gReatAutomation 5 1,444 10-26-2020, 03:47 PM
Last Post: Dean Roddey
  Widget color and states bryanb 10 2,533 08-14-2020, 03:29 PM
Last Post: Dean Roddey
  Possible Bug in Web Browser Widget or SetURL kblagron 8 2,456 04-29-2020, 06:58 PM
Last Post: kblagron
  I cant enter parameters for sizing into the webcam widget. I get errors about invalid ghurty 2 1,243 04-29-2020, 04:01 PM
Last Post: Dean Roddey
  Is there a way to have an image displayed that is not imported? ghurty 3 1,051 04-28-2020, 04:22 PM
Last Post: Dean Roddey
  Check Box widget on WebRIVA vs Interface Viewer bryanb 1 1,046 04-23-2020, 06:15 AM
Last Post: bryanb
  Timers Driver / Field Time Image / Seconds gReatAutomation 1 1,155 03-16-2020, 05:48 PM
Last Post: Dean Roddey
  Problem with Accesssing Variables Driver Client Interface kblagron 5 2,134 03-05-2020, 02:24 PM
Last Post: kblagron

Forum Jump:


Users browsing this thread: 1 Guest(s)