Announcement

Collapse
No announcement yet.

How to disable a Winbutton?

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

  • How to disable a Winbutton?

    I am working with a uLCD-43DCT connected to an Arduino Mega 256. After some initial problems the user interface and the code on the Arduino work quite well. Now I would like to disable (=make invisible) under certain conditions some of the winbuttons in order to keep the user-interface free from every unnecessary elements. The workshop software offers under "Projects" the possibility to "allow buttons to be disabled". However I did not find any hint for the code to be used to disable buttons. I tried

    genie.WriteObject(GENIE_OBJ_WINBUTTON, 1, false);

    but this did not work.

    Has anyone had the same problem and resolved it successfully? Thank you in adavance for your valuable contribution!

  • #2
    Hello and welcome to the forum

    You write -1 to the winbutton to disable/hide it

    Regards
    James

    Comment


    • #3
      Hello and thanks!

      As you proposed I used the command

      genie.WriteObject(GENIE_OBJ_WINBUTTON, 1, -1);

      However the winbutton does not really disappear but will be replaced by a red diagonally crossed rectangle. And the button area is still active. Did I misunderstand you?

      regards

      Comment


      • #4
        In Workshop's Project Tab, is 'Allow buttons to be disabled' down?
        Mark

        Comment


        • #5
          Thanks for the hint. Now it works perfectly!. In order to unhide the button I have obviousely to send a "0" to the button.
          A comment if you allow: I think such features should be better documented by 4Dsystems. Often the only way to find out "what and how to do" is "trial and error", looking for examples and searching in the forums. This may sometimes take hours and hours. A well structured documentation would save a lot of time.The App-Notes of 4D Systems concentrate in most cases on the 4D Systems part and give only few or even no advise how the Arduino or Raspery code should look like.
          Thanks again for your quick and competent support!
          Hans Kummer

          Comment


          • #6
            The manual says "Note: If enabled as an option in the project tab, buttons can be disabled by writing 0xFFFF to them as their value. Buttons can be re-enabled by writing a ‘normal’, non 0xFFFF value to them." at the bottom of section 3.2.1.1. This is the page that is opened if you press F1 when a button is selected in Workshop.

            The latest manuals are to be found in C:\Users\Public\Documents\4D Labs\4DUpdates\Manuals and I think we need to put a link to this folder in the Workshop IDE folder.

            Whilst I'm sure we could document many things better, sometimes it's a bit hard to see the wood for the trees.

            How would you suggest this information could have been better placed?
            Mark

            Comment


            • #7
              Dear Mark
              Thanks for your quick reply!
              It was never my intention to criticize the work of 4D systems; please understand my comments as the feedback of a newbe who tries to find the relevant information he needs. And here I must say that this is sometimes really not easy. Example: The App Note "VisiGenie Advanced buttons", July 21st, 2014, which can be downloaded from your homepage says nothing about hiding/unhiding of buttons. (of course not, this Note was issued before the new release of Workshop was published). The Reference Manual you mentioned is not available from the App Notes Menu but must be searched elsewhere on your homepage. Google search (4D Systems Reference Manual) ends in a dead link: http://www.4dsystems.com.au/download...anual-REV1.pdf. That the new Reference Manual is stored somewhere in the depths of my file-system could really not be known by the users.
              Having said this I think we can now close this post. Thanks again for the support and the patience with a newbe :-)

              Regards,

              Hans

              Comment

              Working...
              X