Welcome, Guest
Username: Password: Remember me
Discussions for CodeTyphon Object Pascal Programming Language
  • Page:
  • 1

TOPIC:

DTThemedGauge Pointer Change 8 years 4 weeks ago #10130

  • Mark Moore
  • Mark Moore's Avatar Topic Author
  • Visitor
  • Visitor
Hi I recently found Code Typhon and love it. I am thinking of a little project that needs a couple of analogue gauges. The DTThemedGauge look suitable. I would like to change the pointer color depending on the input value. I can change the pointer color statically but do not seem to be able to change it dynamically. I just get errors when I try to do it using something like

If DTThemedGauge1.position >= 80 then DTThemedGauge1.Pointer.Color := clRed ;

So is it possible to reference the gauge pointer in the code and change the color ?

I am not overly familiar with Pascal so apologies in advance.

Thanks Mark.

Please Log in or Create an account to join the conversation.

DTThemedGauge Pointer Change 8 years 3 weeks ago #10131

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir
Yes, you can this
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

DTThemedGauge Pointer Change 8 years 3 weeks ago #10134

  • Mark Moore
  • Mark Moore's Avatar Topic Author
  • Visitor
  • Visitor

Sternas Stefanos wrote: Yes, you can this


Hi Sternas,
I was hopeing that someone might point me in the right direction, perhaps how I reference the pointer to change it !
Thanks , kind regards Mark.

Please Log in or Create an account to join the conversation.

DTThemedGauge Pointer Change 8 years 3 weeks ago #10135

  • Mark Moore
  • Mark Moore's Avatar Topic Author
  • Visitor
  • Visitor
SOLVED:-

If DTThemedGauge1.position >= 80 then DTThemedGauge1.PointerCapSettings.Fillcolor := clRed ;
If DTThemedGauge1.position >= 80 then DTThemedGauge1.PointerSettings.color := clRed ;

This turns the needle and the needle cap red when the trigger value is reached. Just needed to do a bit more digging.
Thanks , kind regards Mark.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1