Author Topic: basic button problem "imagelist"  (Read 1609 times)

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
basic button problem "imagelist"
« on: June 14, 2018, 05:00:43 PM »
hello

when i use the basic button
i changed the picture using imaglist
so i choose the image list i need wich have to images in it

but when i click the button it does not change
so how to make happen ?
and is there a way to keep the button working but transparent?

am using (AdvancedHMIv399x )

any ideas?

with thanks

« Last Edit: June 14, 2018, 05:02:21 PM by oqapsking »

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: basic button problem "imagelist"
« Reply #1 on: June 14, 2018, 05:35:51 PM »
or at least can i change the basic button images?

if the value is 0 show image 1
if the value is 1 show image 2
like the imagedisplaybyvalue
but without the imagelist tool  so the image can be with any size


i want it like the graphicindecator but with one address to click on it and change the image  according to the plc address value

Phrog30

  • Guest
Re: basic button problem "imagelist"
« Reply #2 on: June 14, 2018, 06:32:28 PM »
The stock button doesn't allow for it. I've got one that does. I'm not at my computer but if you are interested I can send it later. Or, you can ask Archie to update his.

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: basic button problem "imagelist"
« Reply #3 on: June 14, 2018, 07:03:10 PM »
thanks man i hope u can send it as soon as possible

Phrog30

  • Guest
Re: basic button problem "imagelist"
« Reply #4 on: June 15, 2018, 09:32:05 AM »
Here you go...
https://drive.google.com/file/d/1IjN94gtNqa_Rsv_RXPGjrC-HGKRcLQ2N/view?usp=sharing

I added the control to the latest beta version.  It's a little complex and cumbersome to setup, which I why I created designer forms, but I didn't include those, so you will have to setup the old fashioned way (properties).  You can simply toggle the highlight property to visually see the state change in design mode.

James
« Last Edit: June 15, 2018, 10:33:20 AM by Phrog30 »

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: basic button problem "imagelist"
« Reply #5 on: June 16, 2018, 05:42:47 AM »
thanks man i tested it and it worked good


Phrog30

  • Guest
Re: basic button problem "imagelist"
« Reply #6 on: June 16, 2018, 03:31:06 PM »
Good to hear, hope it's what you were looking for. I was hoping Archie would incorporate that button in his project because it really has a lot more options.

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: basic button problem "imagelist"
« Reply #7 on: June 17, 2018, 06:23:40 AM »
there is one thing i need
is there a way to make the image stretch in it?

it has middle center , right center ...
but can we make it stretch?

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: basic button problem "imagelist"
« Reply #8 on: June 17, 2018, 07:11:45 AM »
One way you could achieve that is to correct 4 lines of code that say either MyBase.Image = m_Image or MyBase.Image = m_Image_Alternate.

You would change MyBase.Image to MyBase.BackgroundImage and then, in the Designer, set BackgroundImageLayout property to Stretch.

These 4 lines are inside the Image property and the Highlight property.

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: basic button problem "imagelist"
« Reply #9 on: June 17, 2018, 08:16:03 AM »
thanks alot it workd :)