Announcement

Collapse
No announcement yet.

WinButton settings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WinButton settings

    Hi,

    For my current project, I use some winButton and so I have some questions about it.
    - Can I change background color of my button when I press and release it ? Because we can change the color and information of status (in little bubble) when "On" and "Off" but not for all button, and I think it's a shame to have a gray layout that appears when you press the button and not another color we could choose.
    - Have it some ways to display outline button (BevelColor) but without displaying the layout in background (kind of wave to create relief I think) ? means if I set "Simple Layout" to "Yes" I have possiblity to have "Bevel" displayed.

    Thank you in advance for your clarifications

  • #2
    Hi Elektron,

    The winbutton object is more like a 'ready-made' button object, i.e. it has most of its properties already configured and you can use it as it is or with a few modifications. As a consequence, however, you have limited control of all of its properties/behaviour.

    It seems that the user button object is the right widget for your application. Initially it is an 'empty' button object. You must have to add to it images which will be displayed when the button is pressed, released, toggled, etc.

    For a momentary user button, you add two images:
    image 1 - will be displayed when the button is released (also the initial state)
    image 2 - will be displayed when the button is pressed(then back to image 1


    For a toggled user button, you add four images:
    image 1 - initial state
    image 2 - will be displayed when the button is pressed
    image 3 - will be displayed when the button is released (toggled)
    image 4 - will be displayed when the button is pressed (then back to image 1 when released)

    Have a look at 4D-AN-D4006 ViSi-Genie User Button for examples.

    Hope this helps and regards.
    Doff

    Comment


    • #3
      Hi Doff,

      Thank you for your answer.

      You're right, effectively "user button" is more adapted for my application.
      Constraint is just the fact we must create each image for each button action but is more flexible to do what we want to do.

      Thank you for your solution !

      Comment


      • #4
        You could effectively create your button using several winbuttons and using gci2bmp to extract the generated button out of the GCI and then add them in again using a userbutton. Messy, but depending on what you want or need, it might be easier than any other way.
        Mark

        Comment

        Working...
        X