dcsimg
Results 1 to 9 of 9

Thread: Glossy buttons

  1. #1

    Thread Starter
    Junior Member Derp!'s Avatar
    Join Date
    Jan 2019
    Posts
    22

    Cool Glossy buttons

    A bit ago I found a neat control named isButton that allowed you to set a number of different button styles, including a glossy looking "MacOSX" style. The buttons could adopt a normal button behaviour or act as a checkbox button. The buttons looked really nice but unfortunately there were a few bugs that needed fixing and the glossy button was only available in dark blue. After some retooling to make the control suite my needs, the bugs have been fixed and there are now two additional styles of button. First is the MacOSXTinted, which allows you to specify a color tint to apply to all three button states (Normal, MouseOver "Hot", and Down). Second is the MacOSXMultiTint, which allows you to specify different color tints to each of the three button states (Normal, MouseOver "Hot", and Down). Additionally, an icon can be specified for the up and down states in checkbox mode. Originally, the Iconsize property forced you to specify the icon sizes. This is still allowed if you want to force the icon size or can be set to 0 to use the icon's dimensions. After updating, I contacted the original author (Fred.cpp) who kindly granted permission to post the update. His original version can still be found here.

    Attachment 171001

    - For the MacOSXTinted style, the Icon property sets the icon for all states of the button style and for the up and hot state of the checkbox style.
    The IconDown property sets the icon for the down state (Value property = true) of checkbox style buttons
    - IconSize Property: If set to 0, the icon's dimensions are used. If set to another value (in pixels), that size is forced.
    IconDownSize Property: Same as IconSize but applies to the down state icon.
    - Color tinted styles. TintColorNormal uses the hue of the selected color to tint all states of the MacOSXTinted style and the Normal state of the MacOSXMultiTint style.
    TintColorHot uses the hue of the selected color to tint the Hot (MouseOver) state of the MacOSXMultiTint style.
    TintColorDown uses the hue of the selected color to tint the MouseDown state of the MacOSXMultiTint style.

    To do:
    - I'd like to change it so that instead of tinting the button with just the hue, the selected color's other attributes are applied while still maintaining the appearance. I've tried a few different things but haven't gotten it to work. Any help here would be appreciated.

    Updated zip file 2019-09-12. Tooltips work properly again. However, you need to use ToolTipsText instead of ToolTipText property.

    Update 2019-09-30
    This is still a work in process. The Icon drawing needs a little work but otherwise it works as I need it to. This version (3.6.5) draws all buttons to a DC in the memory instead of directly to the usercontrol. The final image is BitBlted to the usercontrol when all the drawing is done. Additionally, the radio button style is now available. Additional styles are available now including a GDI+ version of the MacOSX that is color customizable and a Glossy Button style (mine). A Plain style is available for use with checkbox and radio styles. Finally, an Owner drawn style is available for anyone wanting to do their own graphics.

    Update 2019-10-11
    This is probably the last update for a while. OwnerDrawn style bug is fixed and works properly. Background style (Transparent/opaque) available for plain style.
    Name:  Update.jpg
Views: 262
Size:  38.6 KB
    Attached Files Attached Files
    Last edited by Derp!; Oct 11th, 2019 at 09:13 PM.

  2. #2
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    379

    Re: Glossy buttons

    can not change tooltip Properties.can not set tooltip titel .icon and style.

  3. #3
    Frenzied Member
    Join Date
    Dec 2008
    Posts
    1,270

    Re: Glossy buttons

    Anyone using this (or using Fred's latest PSC version) will find (to their dismay) that it does not work in Windows Server.
    I am presently using ver 3.7.2 (updated by David Cunha)
    http://www.planet-source-code.com/vb...70247&lngWId=1

    I am fairly sure that Fred's 3.6.2, the OPs 3.6.4, and David's 3.7.2
    all suffer from the same bug, preventing it running in Windows Server.

    Now if I were not 77, I would remember what I did to fix it,
    Rob

  4. #4

    Thread Starter
    Junior Member Derp!'s Avatar
    Join Date
    Jan 2019
    Posts
    22

    Re: Glossy buttons

    Quote Originally Posted by Bobbles View Post
    Anyone using this (or using Fred's latest PSC version) will find (to their dismay) that it does not work in Windows Server.
    I am presently using ver 3.7.2 (updated by David Cunha)
    http://www.planet-source-code.com/vb...70247&lngWId=1

    I am fairly sure that Fred's 3.6.2, the OPs 3.6.4, and David's 3.7.2
    all suffer from the same bug, preventing it running in Windows Server.

    Now if I were not 77, I would remember what I did to fix it,
    Rob
    Thanks for posting the link to David's update. Please note that 3.6.4 is simply the version number I gave my update as I was working with 3.6.2. I don't have a Windows Server machine running so I can't see what the problem is. I did look at briefly David's and it appears to still have some of the bugs I fixed including:
    - Button doesn't go back up when the mouse is move out if the left button is down.
    - If the mouse button goes up after the mouse has left the control, the click event still triggers (try it with the close button)

  5. #5

    Thread Starter
    Junior Member Derp!'s Avatar
    Join Date
    Jan 2019
    Posts
    22

    Re: Glossy buttons

    Good catch! The original version didn't set the tooltip text correctly. I fixed that but in the process borked the fancy text balloon. I'll try to fix that soon and post an update!

  6. #6

    Thread Starter
    Junior Member Derp!'s Avatar
    Join Date
    Jan 2019
    Posts
    22

    Re: Glossy buttons

    I've uploaded an updated zip file. Note that due to issues with using the custom tooltiptext, you need to use the added ToolTipsText property instead of the UserControl's ToolTipText property.

  7. #7

    Thread Starter
    Junior Member Derp!'s Avatar
    Join Date
    Jan 2019
    Posts
    22

    Re: Glossy buttons

    Probably the last update for a while has been posted.

  8. #8
    Fanatic Member
    Join Date
    Dec 2012
    Posts
    810

    Re: Glossy buttons

    Regarding your original MAC OSX button, I found a number of redundancies in the pixel code and I fixed the white border on the end plates. But the dark border on the upper corners appears ragged compared to the lower corners. Do you have any idea of where to find the original RGB colors?

    J.A. Coutts

  9. #9

    Thread Starter
    Junior Member Derp!'s Avatar
    Join Date
    Jan 2019
    Posts
    22

    Re: Glossy buttons

    Quote Originally Posted by couttsj View Post
    Regarding your original MAC OSX button, I found a number of redundancies in the pixel code and I fixed the white border on the end plates. But the dark border on the upper corners appears ragged compared to the lower corners. Do you have any idea of where to find the original RGB colors?

    J.A. Coutts
    I noticed that, too. The original Mac button was Fred's his original RGBs are in the DrawMacOSXButton, DrawMacOSXButtonHot, and DrawMacOSXButtonPressed subs. Beyond that, I have no idea.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width