dcsimg
Results 1 to 6 of 6

Thread: Glossy buttons

  1. #1

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

    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.

    Name:  isButton.jpg
Views: 160
Size:  47.7 KB

    - 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.
    Attached Files Attached Files
    Last edited by Derp!; Sep 12th, 2019 at 01:31 PM.

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

    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,205

    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
    17

    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
    17

    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
    17

    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.

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