I am trying to dynamically set the Style.Color of a text box with a custom function but keep getting errors back

1 Answer 16 Views
.NET Framework Binding Styling
JOHN
Top achievements
Rank 1
Iron
JOHN asked on 19 Nov 2025, 12:03 PM

I have a 2 custom functions but neither seem to work.

I have an Action on a text box control to set Style.Color with these expressions (tried both)

= EIT.EITNumberColourHex( Fields.pnFeesTotal )

I have also tried this

= EIT.EITNumberColour( Fields.pnFeesTotal )

But I get errors saying "Cannot find overload of function ..."

My functions headers are

        [Function(Category = "EITFunctions", Namespace = "EIT", Name = "EITNumberColour", Description = "Returns number colours red,blue or black based on parameters", IsVisible = true)]
        public static System.Drawing.Color EITNumberColour(decimal number, bool useColour = true)

 

        [Function(Category = "EITFunctions", Namespace = "EIT", Name = "EITNumberColourHex", Description = "Returns number colours red,blue or black based on parameters in hex", IsVisible = true)]
        public static string EITNumberColourHex(decimal number, bool useColour = true)
        {

 

Can you anyone advise what am doing incorrectly?

Thanks

John

1 Answer, 1 is accepted

Sort by
0
Accepted
JOHN
Top achievements
Rank 1
Iron
answered on 20 Nov 2025, 06:05 PM

I worked it out.
For user defined functions parameters are not optional and must all be supplied.
Thank you.

Tags
.NET Framework Binding Styling
Asked by
JOHN
Top achievements
Rank 1
Iron
Answers by
JOHN
Top achievements
Rank 1
Iron
Share this question
or