Announcement

Collapse
No announcement yet.

Creating New WS4 Widgets

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

  • Creating New WS4 Widgets

    Hi,

    Is there any good way for a WS4 user to create new widgets and incorporate them into the WS4 IDE? Also, where are the graphics files for the existing WS4 widgets located in the WS4 directory structure? What format are these files in (e.g. .png, .gif, .gci, etc.)?

    Thanks,

    Charlie

  • #2
    What sort of widgets are you after? The user buttons widget should be good for generating any sort of button. Other things might be easy or hard depending on how they need to behave.

    All the buttons, except Fancy Buttons are in and beneath C:\Program Files (x86)\4D Labs\4D Workshop 4 IDE\SysImages\Buttons, everything else is dynamically built.
    Mark

    Comment


    • #3
      I also have a need for a custom widget.
      I would like to have a bar gauge that acts like a null gauge.
      For example I would like to have the bar show red-yellow-green-yellow-red and a needle move (highlighted color)
      Is there a way to build this?

      Comment


      • #4
        You need to build the images for each position yourself. Then put them into a 'User Images' widget. Then the 'user images' widget becomes your gauge
        Mark

        Comment


        • darthhamos
          darthhamos commented
          Editing a comment
          Mark, how would we go about doing this process, is there an example or tutorial on how to accomplish this? Just using the "User Image" under [System]Media] adds just a picture...

        • Juniel Cruz
          Juniel Cruz commented
          Editing a comment
          You can check these appnotes:

          http://www.4dsystems.com.au/appnote/4D-AN-00034/
          http://www.4dsystems.com.au/appnote/4D-AN-00074/

          The new version of Workshop4 PRO offers a new feature which allows you to generate custom gauges, knobs and sliders.
          You may also want to check this new feature out.

          Appnotes are also available for this new feature if you are interested. http://www.4dsystems.com.au/appnotes

          Simply check "smart-widgets" from Sub-category then click on the search button to filter these appnotes.

      • #5
        Juniel, does this mean that---for certain---to create a "custom" gauge, button, or display Widget one MUST purchase the PRO license?

        Comment


        • #6
          No, PRO is only needed 'Smart Widgets', 'user buttons' and 'user images' don't need PRO
          Mark

          Comment


          • #7
            That's right. Smart Gauges are only available for PRO version. While User images and User buttons don't need PRO.

            With UserImages, you can generate custom widgets you have designed using image editing applications. In that case, you will need to generate all frames you need. This is one way to do it.

            The other way is available only with the PRO version which has a lot of advantages over the use of UserImages like when you need to adjust the number of frames of a custom gauge. When using UserImages, you'll need to recreate and generate the new frames required which can be a lot of work. While when using a Smart Gauge, you'll just need to modify some parameters and it will generate everything by itself.

            There are other advantages that are notable specially when using ViSi Genie environment.
            Last edited by Juniel Cruz; 3rd August 2017, 11:00 AM.
            Juniel Cruz

            Comment


            • darthhamos
              darthhamos commented
              Editing a comment
              Juniel, is ViSi Genie only available with the Pro license?

              Also your explanation of UserImages is helpful, but still missing info about linking the Gauge to Events...? E.g. how does one take the spread of Images and turn them into a Gauge (or have I misunderstood, and that is not actually possible?)

          • #8
            If you have installed Workshop4 you'll notice that ViSi Genie Environment is available for free.

            A Pro version will give you access to Genie Magic which allows you to add your own code to any of your ViSi Genie project. It also gives you access to Smart Widgets as discussed above.

            but still missing info about linking the Gauge to Events...?
            You can simply link an Event to the Userimages object that you designed to be a gauge. Just like how you would do it for other available gauges.

            how does one take the spread of Images and turn them into a Gauge (or have I misunderstood, and that is not actually possible?)
            If you have checked the Appnotes I've sent earlier, you'll notice that you can place multiple images in a Userimages object as discussed in those documents. You can even arrange them as you want. Those documents shows you in detail how to add the images.

            So if you want a gauge out of a Userimages object, you will have to create all the frames needed for all the values you need. Then place it in the user images object. And simply use it as you would use other gauges.
            Juniel Cruz

            Comment

            Working...
            X