Results 1 to 40 of 62

Thread: [VB6] FIRENZE LABEL - label control with so many functions

Hybrid View

  1. #1
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,891

    Re: [VB6] FIRENZE LABEL - label control with so many functions

    Quote Originally Posted by Mojtaba View Post
    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.

  2. #2
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    235

    Re: [VB6] FIRENZE LABEL - label control with so many functions

    Quote Originally Posted by jpbro View Post
    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

    Name:  svg.png
Views: 735
Size:  5.3 KB
    Last edited by Mojtaba; Apr 27th, 2024 at 12:23 AM.

  3. #3
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,891

    Re: [VB6] FIRENZE LABEL - label control with so many functions

    Quote Originally Posted by Mojtaba View Post
    I added an SVGColor property, but I can't set it to change the color of the icon

    Name:  svg.png
Views: 735
Size:  5.3 KB
    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).

  4. #4
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    235

    Re: [VB6] FIRENZE LABEL - label control with so many functions

    Thanks jpbro
    I have Done it
    Attached Images Attached Images  
    Last edited by Mojtaba; Apr 27th, 2024 at 12:22 AM.

  5. #5
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,891

    Re: [VB6] FIRENZE LABEL - label control with so many functions

    Quote Originally Posted by Mojtaba View Post
    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
  •  



Click Here to Expand Forum to Full Width