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.
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.
Linear Gauge component change
-
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
Linear Gauge component change
- 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
-
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
Hi
Catching your eye is a big bonus on a screen filled with whatever. Next you will have it flashing alternate colours
Regards
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
-
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
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.
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
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.
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
Re: Linear Gauge component change
I have improved the Linear Gauge even further.
After selecting Custom Colours, you can now select between 0 and 5 sets of ranges. 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.
After selecting Custom Colours, you can now select between 0 and 5 sets of ranges. 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
Re: Linear Gauge component change
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
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: 2312
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 642 times
- Been thanked: 850 times
Re: Linear Gauge component change
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
Aha it's inside the property event.
Do we want the same functionality for the slider component?
Do we want the same functionality for the slider component?