Linear Gauge component change

Post and discuss new components that you have created.
medelec35
Valued Contributor
Posts: 2452
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 792 times
Been thanked: 850 times

Flowcode v11 Linear Gauge component change

Post by medelec35 »

Hi all.
I have made an unofficial change to the linear gauge which will be beneficial to PC Developer
You can add three sets of value ranges for three custom colours.
To do that for the Style select Custom Colours.
Than ad the values adjust you can make the colours show all is ok ok or danger etc.
I modified it for my requirements, but if there is enough interest I could add a drop down to allow 0 to 10 custom colours and value ranges.
Linear Slider change.png
Linear Slider change.png (171.68 KiB) Viewed 210 times
Place the attached component (LinearGauge.fcpx) into a folder, e.g. "Flowcode Custom Components".
In Flowcode: File > Global Settings > Locations tab > add that folder path under "Look for components in..." (add a semicolon suffix to include subfolders).
File > Reload.
Component Libraries > Indicators > Analog Indicator, right-click "LinearGauge" > Details, to confirm it's loaded from the right folder.

Note If you want to customise the colours irrespective of the value, then set the values so they will never be reached e.g. -1000 or 10000 etc.
Attachments
LinearGauge.fcpx
(4.12 KiB) Downloaded 6 times
Linear Gauge Test.fcpcd
(15.55 KiB) Downloaded 5 times
(view online)
Martin

chipfryer27
Valued Contributor
Posts: 2131
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 478 times
Been thanked: 712 times

Re: Linear Gauge component change

Post by chipfryer27 »

Hi Martin

This seems a very useful addition.

Regards

medelec35
Valued Contributor
Posts: 2452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 792 times
Been thanked: 850 times

Re: Linear Gauge component change

Post by medelec35 »

Thanks Iain.
I did change it in a different way to start with, but I feel it wasn't yelling out enough :lol:
Linear guage change diff look.png
Linear guage change diff look.png (25.78 KiB) Viewed 194 times
Martin

chipfryer27
Valued Contributor
Posts: 2131
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 478 times
Been thanked: 712 times

Re: Linear Gauge component change

Post by chipfryer27 »

Hi

Catching your eye is a big bonus on a screen filled with whatever. Next you will have it flashing alternate colours :)

Regards

medelec35
Valued Contributor
Posts: 2452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 792 times
Been thanked: 850 times

Re: Linear Gauge component change

Post by medelec35 »

chipfryer27 wrote: ↑
Sun Sep 27, 2026 9:00 pm
Next you will have it flashing alternate colours :)
I can take requests :lol:
Martin

Steve-Matrix
Matrix Staff
Posts: 2041
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 310 times
Been thanked: 475 times

Re: Linear Gauge component change

Post by Steve-Matrix »

Thanks, Martin. That looks like a nice addition to that component.

It might be worth posting the source to the component too so that users can see what you have added or changed, and can also see what version of the component you have modified. This is especially important if the official component is updated in the future and your modified component becomes out-of-sync with the new one.

And if you think it worthwhile that your changes should be added to the official component, then please get in touch.

medelec35
Valued Contributor
Posts: 2452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 792 times
Been thanked: 850 times

Re: Linear Gauge component change

Post by medelec35 »

Hi Steve, thanks.
I do supply the source, but only when I happy with the final version.
I usually give Ben the source to any component that I fix and create e,g, NEC decoder.
I have decided to add the drop down selection so if want all custom colours don't need to add out of range numbers.
I'm also increasing from 3 to 5 sets of number ranges.
Martin

medelec35
Valued Contributor
Posts: 2452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 792 times
Been thanked: 850 times

Flowcode v11 Re: Linear Gauge component change

Post by medelec35 »

I have improved the Linear Gauge even further.
After selecting Custom Colours, you can now select between 0 and 5 sets of ranges.
Linear guage range slection.png
Linear guage range slection.png (31.23 KiB) Viewed 140 times
Select 0 if you want to change to a colour an don't want to use the range option.
I have attached the component and the source.
Attachments
LinearGauge.fcpx
(4.26 KiB) Downloaded 4 times
LinearGauge.fcfx
(32.2 KiB) Downloaded 5 times
(view online)
Martin

medelec35
Valued Contributor
Posts: 2452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 792 times
Been thanked: 850 times

Flowcode v11 Re: Linear Gauge component change

Post by medelec35 »

Added the ability to make ranges invisible if a different choice to Custom Colours is selected.
Changed version to 2.0.
Added Change log so it can be used to update existing Liner Gauge component.

Note: component is not appearing within update database.

@BenR Component is now within Modified Source section to use or remove :)
Attachments
LinearGauge.fcpx
(4.27 KiB) Downloaded 3 times
LinearGauge.fcfx
(32.88 KiB) Downloaded 4 times
(view online)
Martin

BenR
Matrix Staff
Posts: 2313
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 642 times
Been thanked: 850 times

Re: Linear Gauge component change

Post by BenR »

Just looking at this now, looks good to me though I can't see why the colour change is happening when you only do a setvalue. It is working but I can't see why :D Aha it's inside the property event.

Do we want the same functionality for the slider component?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

Post Reply