× Discussions for CodeTyphon Object Pascal Programming Language

Question DTThemedGauge Pointer Change

  • Mark Moore
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
3 years 9 months ago #10130 by Mark Moore
DTThemedGauge Pointer Change was created by Mark Moore
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.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
3 years 9 months ago #10131 by Sternas Stefanos
Replied by Sternas Stefanos on topic DTThemedGauge Pointer Change
Thanks Sir
Yes, you can this

PilotLogic Architect and Core Programmer

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

  • Mark Moore
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
3 years 9 months ago #10134 by Mark Moore
Replied by Mark Moore on topic DTThemedGauge Pointer Change

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.

  • Mark Moore
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
3 years 9 months ago #10135 by Mark Moore
Replied by Mark Moore on topic DTThemedGauge Pointer Change
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.