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 😉

6replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Chouette Jacques TUR  merci!

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

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

      Like
    • 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.

      Like
    • UweG
    • UweG
    • 7 mths ago
    • Reported - view

    Like it.
    Put following script 'on click':

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

    and you get a button counter.

    Like 2
    • 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.

      Like
Like4 Follow
  • 4 Likes
  • 3 wk agoLast active
  • 6Replies
  • 229Views
  • 6 Following