VB6 Color Palette Control / List Box - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: VB6 Color Palette Control / List Box

  1. #16
    Join Date
    Nov 2004
    Location
    LA. California Raiders #1 AKA: Gangsta Yoda™
    Posts
    616

    Re: VB6 Color Palette Control / List Box

    Hi Neil,

    Its really easy to add the Color Property Page to your UserControl. The last part to do is populate the colors.

    In your UserControl there is a PropertyPages property which when you click the elipsis it brings up a dialog where you can check the box to add the Color property page tab to your UserControl. The dialog is captioned as "Connect Property Pages". Also in there will be your custom property page if any exist.

    I have added two forms of property page type to my usercontrol project and also the Color Property Page as you can see in my attached screenshot.

    In the code behind view you can use the Tools > Procedure Attributes... to associate your property with the desired property page.

    -Robert

    Ps, this is my custom property page dialog as you can see only Column Header and Icon Imagelist tabs
    Attached Images Attached Images   
    VB/Office Guru™ (AKA: Gangsta Yoda™)
    VB Forums - Super Moderator 2001-Present

    Microsoft MVP 2006-2011

    Please use [code]your code goes in here[/code] tags when posting code.

    Senior Software Engineer MCP, BSEE, CET
    VS 2012 Premium, VS 6.0 Enterprise SP6, VSTO, Office Ultimate 2010, Windows 7 Ultimate
    Star Wars Gangsta Rap SE Reputations & Rating Posts Office Primary Interop AssembliesAdvanced VB/Office Guru™ Word SpellChecker™.NETAdvanced VB/Office Guru™ Word SpellChecker™ VB6Outlook Global Address ListVB6/Crystal Report Ex.VB6/CR Print Setup Dialog Ex.

  2. #17
    Join Date
    Sep 2009
    Posts
    4

    Re: VB6 Color Palette Control / List Box

    Hi Hannes, (and the rest of you

    Thanks for your help and research, sorry I havent replied sooner, I have just revisited problem, and looking into it again.

    certain some good ideas in the source their, may see if I can play with columns / colours in the list box maybe, to get a closer look.

    Its a shame this control isnt available as I see it used so much in other 3rd party controls, it must be out the somewhere for all of them to use it.

    Or the API that adds images to List Box, so I can do my own.

    Thanks again Hannes for the work you put in, very rare indeed to see this kind of effort on forums


    Neil



    Quote Originally Posted by HanneSThEGreaT View Post
    OK...

    Mine is not so pretty as your shown picure, but it is still pretty funky ( I think so )

    What happens with my project is that it overrides the standard listbox in order to display the system colours ( that you want ). How the list displays them is, with each colour, the item's background is that associated colour.

    Have a look at it, it does work, but if it is not what you wanted, or if you wanted something a bit more funky, I'll see what I can come up with - just note, I have very limited time these days, so I'll try my best for you

    Have fun!

    Hannes

  3. #18
    Join Date
    Sep 2009
    Posts
    4

    Re: VB6 Color Palette Control / List Box

    Hi RobDog,

    Thanks for reply

    See attached, for what I am trying to acheive, I have a series of properties that are not directly exposed by the control, which dont get picked up by the Property Page Wizard / Color Properties, so I am trying to find the Color Set Combo / Color Pallete List Box , Edit Cusom Color Button combination as a control somewhere, so I can utilise it in a custom way as they do in TDBGRid, and other controls.

    Regards

    Neil


    Quote Originally Posted by RobDog888 View Post
    Hi Neil,

    Its really easy to add the Color Property Page to your UserControl. The last part to do is populate the colors.

    In your UserControl there is a PropertyPages property which when you click the elipsis it brings up a dialog where you can check the box to add the Color property page tab to your UserControl. The dialog is captioned as "Connect Property Pages". Also in there will be your custom property page if any exist.

    I have added two forms of property page type to my usercontrol project and also the Color Property Page as you can see in my attached screenshot.

    In the code behind view you can use the Tools > Procedure Attributes... to associate your property with the desired property page.

    -Robert

    Ps, this is my custom property page dialog as you can see only Column Header and Icon Imagelist tabs
    Attached Images Attached Images  

  4. #19
    Join Date
    Dec 2001
    Posts
    6,332

    Re: VB6 Color Palette Control / List Box

    I think the properties to be included on the StandardColor PropertyPage must be declared as Public in order to show up. Do you want some properties to not be public, while still showing in the color PropertyPage?

    Attached is an example which achieves what you've shown.
    Attached Files Attached Files
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  5. #20
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,098

    Re: VB6 Color Palette Control / List Box

    WizBang I wish I was as brilliant as you...

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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center