1. Nish Ag
  2. PowerBuilder
  3. Wednesday, 20 October 2021 23:26 PM UTC

In powerbuilder, is it possible to turn a picture into an button? If so is it possible to program it so that if I hover on top of it then it replaces the picture with another picture?

Would this be achieved via theme.json, or through powerbuilder or something?

How would I achieve this, what code what I have to type?

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 20 October 2021 23:50 PM UTC
  2. PowerBuilder
  3. # 1

Hi Nishant;

   You have the choice of using a picture, picture button or even a CB with picture in a DataWindow (as a few example controls). All of these controls can capture a "mouse move" event (among others). You can then code a script to change image under that condition. Food for thought.

Regards ... Chris

 

 

 

Comment
  1. Nish Ag
  2. Thursday, 21 October 2021 05:30 AM UTC
Hi Chris,



> You can then code a script to change image under that condition.



Do you know what code I can add to change the image as soon as I hover over the image button?



Addtionally, under checkbox, there is



"box-images":

{

"unchecked":{"file":"checkbox-box-normal-unchecked.bmp"},

"checked":{"file":"checkbox-box-normal-checked.bmp"},

"indeterminate":{"file":"checkbox-box-normal-indeterminate.bmp"}

}



Is there something similar for picturebuttons where on hover will show one image and not hover will show another picture?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 21 October 2021 13:40 PM UTC
The code could vary by control type used but in general ...

This.PictureName = "xxxxx"
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 21 October 2021 15:36 PM UTC
You do this in PowerScript instead of themes.json
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.