3

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 😉

4replies 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
    • UweG
    • UweG
    • 6 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 1
Like3 Follow
  • 3 Likes
  • 6 mths agoLast active
  • 4Replies
  • 173Views
  • 5 Following