Page 2 of 2 FirstFirst 12
Results 41 to 62 of 62

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

  1. #41
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    How to add some features for better control
    I use the 3D Active Button Magic control and it has very good features.
    If it can be added to the Firenze Label control, it would be great.
    For example, you can control multiple captions
    in all directions by changing the color and font of each title

    Name:  3d btn.png
Views: 451
Size:  20.0 KB
    Last edited by Mojtaba; Mar 7th, 2024 at 08:11 AM.

  2. #42
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,287

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

    Quote Originally Posted by Mojtaba View Post
    How to add some features for better control
    ...
    For example, you can control multiple captions
    in all directions by changing the color and font of each title
    Since the Firence-Label is windowless (using relatively few resources) -
    why not solve this problem via:
    - multiple Label-Controls
    - instead of multiple Captions per Label-Control

    IMO such cases should be relatively rare - adding a few more Labels should not be overly complicated.

    Olaf

  3. #43
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    Quote Originally Posted by Schmidt View Post
    Since the Firence-Label is windowless (using relatively few resources) -
    why not solve this problem via:
    - multiple Label-Controls
    - instead of multiple Captions per Label-Control

    IMO such cases should be relatively rare - adding a few more Labels should not be overly complicated.

    Olaf
    I am making a lunar, solar and Gregorian calendar and I need a lot of stickers

    Name:  clander.png
Views: 415
Size:  14.1 KB

    Name:  cn.jpg
Views: 412
Size:  37.3 KB

    Isn't this method better with fewer labels?
    Last edited by Mojtaba; Mar 8th, 2024 at 07:19 AM.

  4. #44
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,287

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

    What about writing your own (windowless) "ucLunarCell.ctl",
    which incorporates 3 of the FirenceLabel-Controls on its "Control-Rectangle"...?

    Olaf

  5. #45
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    Quote Originally Posted by Schmidt View Post
    What about writing your own (windowless) "ucLunarCell.ctl",
    which incorporates 3 of the FirenceLabel-Controls on its "Control-Rectangle"...?

    Olaf
    Olaf, can you explain more, or you give me a sample?
    In my opinion in these cases
    It is better to have a label with multiple titles
    It also takes less time to set up in terms of sorting and does not require multiple tags
    Last edited by Mojtaba; Mar 8th, 2024 at 08:46 AM.

  6. #46
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    Is there an easy way to change the color of SVG icons?

  7. #47
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,287

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

    Quote Originally Posted by Mojtaba View Post
    Is there an easy way to change the color of SVG icons?
    The following Demo shows exactly, how this can be done...
    https://www.vbforums.com/showthread....vbRichClient5)

    Olaf

  8. #48
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    Quote Originally Posted by Schmidt View Post
    The following Demo shows exactly, how this can be done...
    https://www.vbforums.com/showthread....vbRichClient5)

    Olaf
    Thanks Olaf, the problem is that I call the SVG images outside _FontAwesomeSVGs.wac and I can't change the color of the icons.
    I think there is a problem with karo1 control
    Can you test it? I have 3 karo1 controls on the form, each of which has an SVG image, and I want to change the color of the icons with a button.
    I prepared the project and added all the resources

    Name:  Cairo.jpg
Views: 287
Size:  37.7 KB
    Last edited by Mojtaba; Apr 27th, 2024 at 12:23 AM.

  9. #49
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,466

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

    The .ParseContent method of cSVG has a second CSS parameter where you can supply CSS to change the fill colour of the path. e.g. in the karo/firenze label .Draw method:


    Code:
    SVG.ParseContent m_Picture, "path { fill: yellow; }"
    Produces the following:

    Name:  2024-04-23_16-57-13.jpg
Views: 284
Size:  20.1 KB
    Last edited by jpbro; Apr 23rd, 2024 at 04:14 PM.

  10. #50
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    Quote Originally Posted by jpbro View Post
    The .ParseContent method of cSVG has a second CSS parameter where you can supply CSS to change the fill colour of the path. e.g. in the karo/firenze label .Draw method:


    Code:
    SVG.ParseContent m_Picture, "path { fill: yellow; }"
    Produces the following:

    Name:  2024-04-23_16-57-13.jpg
Views: 284
Size:  20.1 KB
    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?
    Last edited by Mojtaba; Apr 23rd, 2024 at 04:29 PM.

  11. #51
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,466

    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.

  12. #52
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

    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: 252
Size:  5.3 KB
    Last edited by Mojtaba; Apr 27th, 2024 at 12:23 AM.

  13. #53
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,466

    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: 252
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).

  14. #54
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

    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.

  15. #55
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,466

    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

  16. #56
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

    Re: [VB6] FIRENZE LABEL - New Update

    FIRENZE LABEL - New Update
    + New Property
    • SVGColor : Change The Color of The SVG icon
    • SVGOpacity : Change Transparency of SVG icon A number between 0.1 and 1
    • SVGRotation : Rotation SVG icon A number between 0 and 360
    To Change the color of svg symbols, it is better to have black SVG images
    Name:  Sample.jpg
Views: 205
Size:  35.7 KB
    Attached Files Attached Files
    Last edited by Mojtaba; Apr 27th, 2024 at 02:14 AM.

  17. #57
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,287

    Re: [VB6] FIRENZE LABEL - New Update

    Quote Originally Posted by Mojtaba View Post
    FIRENZE LABEL - New Update
    + New Property
    • SVGColor : Change The Color of The SVG icon
    • SVGOpacity : Change Transparency of SVG icon A number between 0.1 and 1
    • SVGRotation : Rotation SVG icon A number between 0 and 360
    Nice, ... I see you're getting "the hang of it"...

    Olaf

  18. #58
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

    Re: [VB6] FIRENZE LABEL - New Update

    Quote Originally Posted by Schmidt View Post
    Nice, ... I see you're getting "the hang of it"... Olaf
    Thanks Olaf, these controls would not have been created without your efforts
    Your great work (vbRichClient)
    Last edited by Mojtaba; Apr 27th, 2024 at 03:49 AM.

  19. #59
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    Olaf, I want to add Blur mode
    I added the BackBlur feature
    Please guide me in this regard
    This image is related to the LabelPlus control
    Gdiplus is used, I want to use Cairo

    Name:  BackBlur.png
Views: 143
Size:  259.6 KB

    Only the more optimized the code, the better
    I saw this article but could not apply it to the control
    New Property BackBlur

    Name:  FrostedGlassEffect.png
Views: 145
Size:  435.8 KB
    Attached Files Attached Files
    Last edited by Mojtaba; Apr 27th, 2024 at 08:20 AM.

  20. #60
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    I did this with the help of the widget and the GaussianBlur effect, the only problem is that the control should be captured and called inside itself.

    Name:  Untitled.jpg
Views: 127
Size:  19.5 KB

    Code:
    Set Blr = BackBuf.GaussianBlur(8, Offs)
    CC.RoundedRect m_BorderWidth - 1, m_BorderWidth - 1, UserControl.ScaleWidth - (m_BorderWidth * 2) + 2, UserControl.ScaleHeight - (m_BorderWidth * 2) + 2, 0, True, cmAll, False
    CC.Clip True: CC.RenderSurfaceContent Blr, -Offs, -Offs: CC.ResetClip

  21. #61
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,287

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

    Here's your latest Firenze-Label-Zip - now with BGPicture-Property
    (which allows a simplified way to set Image-Backgrounds with arbitrary opacities, as e.g. "frosted-window.jpg")

    https://vbRichClient.com/Downloads/B...ithBGImage.zip

    Here is, what it looks like... (have choosen the first best "frosted window jpg" which came up in google).



    Olaf

  22. #62
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

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

    Quote Originally Posted by Schmidt View Post
    Here's your latest Firenze-Label-Zip - now with BGPicture-Property
    (which allows a simplified way to set Image-Backgrounds with arbitrary opacities, as e.g. "frosted-window.jpg")
    Here is, what it looks like... (have choosen the first best "frosted window jpg" which came up in google).
    Olaf
    Hello, this image does not give crystal, it can be used as a pattern
    I went most of the way, just need to take a picture from under the control and link it to m_picture
    The blur effect is done on the photo
    Just tell me how to take a picture below the control
    I put the code, add an image to the control, and if BackBlur=true, the image will be blurred
    Reference vbWidgets.dll or RC6Widgets.dll
    New sample :
    Attached Files Attached Files
    Last edited by Mojtaba; May 1st, 2024 at 11:59 AM.

Page 2 of 2 FirstFirst 12

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