|  | 
| Setting color on VB6 cntrl on Task Panel | 
| Post Reply   | 
| Author | |
| Shawshank   Senior Member   Joined: 16 October 2005 Status: Offline Points: 117 |  Post Options  Thanks(0)  Quote  Reply  Topic: Setting color on VB6 cntrl on Task Panel Posted: 21 October 2005 at 8:28am | 
| I added a VB6 CheckBox control to a Task Panel via this statement: Dim Item As TaskPanelGroupItem I need to be able to update the background color of the CheckBox control based on what the user has set for the Visual Style of the Task Panel control. It seems adding the CheckBox control to the Task Panel group prevents the ability to alter the background color. Even if I set the background color of the CheckBox prior to adding it to the Task Panel group it will "lose" the color and revert back to a default color. How does one set the background color of a control that has been added to a Task Panel control? Shawshank | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  Posted: 27 October 2005 at 8:00am | 
| 
   Item.BackColor.
    | |
| 
     Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS | |
|  | |
| Shawshank   Senior Member   Joined: 16 October 2005 Status: Offline Points: 117 |  Post Options  Thanks(0)  Quote  Reply  Posted: 27 October 2005 at 1:19pm | 
| That doesn't seem to work --at least for setting the background color. It works fine for setting other properties like the .Tag or .Tooltip properties. But for the color property I get an error stating: Wrong number of arguments or invalid property assignment. Reviewing the help file indicates that the TaskPanelGroupItem back color property can be set/read using the .Backcolor property. Proper value is a Long. A long is what I am passing. The help also states that the property is read only. So which is it, read only or can it be set and read? | |
|  | |
| kylechen   Groupie   Joined: 29 November 2004 Status: Offline Points: 57 |  Post Options  Thanks(0)  Quote  Reply  Posted: 22 November 2005 at 6:38am | 
| 
   Maybe you can try to put a picture box as the container for check box...   | |
|  | |
| basile   Newbie     Joined: 23 November 2005 Location: Greece Status: Offline Points: 1 |  Post Options  Thanks(0)  Quote  Reply  Posted: 23 November 2005 at 4:00am | 
| 
   I had the same problem with the background color of the check box. Place the check box in a picture box and attach the picturebox to task panel item instead. This workaround will solve the problem... 
    | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |