4

Customized button

Hello everybody,

I added the buttonEvent to Ninext. This allows to dynamically change the caption, the color and the help title of a button. Just add the onUpdate function in the "Display field only, if:" function.

function onUpdate(event : any) do
    {
        caption: Caption,
        buttonColor: text(Color),
        title: Title
    }
end;
true

I also added the possibility to display a badge, like on the files and comments tabs. For this, you just have to add the parameters bages.caption and badge.color : 

function onUpdate(event : any) do
    {
        caption: Caption,
        buttonColor: text(Color),
        title: Title,
        badge: {
            caption: 'badge caption',
            color: 'Badge color'
        }
    }
end;
true

I have added an example of use in attachment.

Enjoy 😉

6 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    Chouette Jacques TUR  merci!

    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    That's clever and like most good things posted here. I then think how can I use that in my system... Like it :-)

      • Ninox developper
      • Jacques_TUR
      • 2 yrs ago
      • Reported - view

      Mel Charles Let me know when you find a use for it 😄

      • Alan_Cooke
      • 1 yr ago
      • Reported - view

      Jacques TUR I have a use - I have a button that deletes attachments, a click is required for each attachment deletion.  This counts up the number of clicks for each deletion.

    • UweG
    • 2 yrs ago
    • Reported - view

    Like it.
    Put following script 'on click':

    'badge caption' := text(number('badge caption') + 1)

    and you get a button counter.

      • Alan_Cooke
      • 1 yr ago
      • Reported - view

      UweG I tried this and it worked apart fromn the fact that I got a perpetual busy loading icon (Ninox variety).  Not sure it's related though.

Content aside

  • 4 Likes
  • 1 yr agoLast active
  • 6Replies
  • 509Views
  • 6 Following