|
-
Apr 23rd, 2024, 04:39 PM
#1
Re: [VB6] FIRENZE LABEL - label control with so many functions
 Originally Posted by Mojtaba
Thanks, jpbro, what should I do if I want to change the color from inside the form?
And another point is that all icons change color and it is not possible to consider a specific color for each icon?
I don't think the label is being developed by the original author any more, so I can't think of any downsides to extending it with your own code as needed at this point. You could add a FillColor property and then you could set the colour for any specific instance to any colour you need. If the .Draw method, add the CSS for the defined FillColor.
Last edited by jpbro; Apr 23rd, 2024 at 04:42 PM.
-
Apr 26th, 2024, 07:49 AM
#2
Addicted Member
Re: [VB6] FIRENZE LABEL - label control with so many functions
 Originally Posted by jpbro
I don't think the label is being developed by the original author any more, so I can't think of any downsides to extending it with your own code as needed at this point. You could add a FillColor property and then you could set the colour for any specific instance to any colour you need. If the .Draw method, add the CSS for the defined FillColor.
I added an SVGColor property, but I can't set it to change the color of the icon
Last edited by Mojtaba; Apr 27th, 2024 at 12:23 AM.
-
Apr 26th, 2024, 09:09 AM
#3
Re: [VB6] FIRENZE LABEL - label control with so many functions
 Originally Posted by Mojtaba
I added an SVGColor property, but I can't set it to change the color of the icon

You're most of the way there - the problem is that you aren't using your SVGColor value in the SVG CSS. You currently have this line in your Draw method:
Code:
CC.SetSourceColor m_SVGColor, m_BackColorOpacity / 100
and this one when you load/parse the SVG data:
Code:
SVG.ParseContent m_Picture, "path { fill: red; }"
You need to get rid of the first line and change the second one to use the SVGColor value (converted to RGB Hex).
-
Apr 26th, 2024, 10:56 AM
#4
Addicted Member
-
Apr 26th, 2024, 02:09 PM
#5
Re: [VB6] FIRENZE LABEL - label control with so many functions
 Originally Posted by Mojtaba
Thanks jpbro
I have Done it
I put the code for friends to use, a feature to change the color of the SVG icon
Nice! Thank you for sharing the code
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|