Print Page | Close Window

Adding Controls to Items.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=9337
Printed Date: 24 November 2024 at 7:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding Controls to Items.
Posted By: SteveDude
Subject: Adding Controls to Items.
Date Posted: 17 January 2008 at 2:01pm
I can't seem to get any non-intrinsic controls to be added as Items. A simple VB Textbox, Checkbox  or Commandbutton will add fine as an item, but controls that I have in my project will not be added. No error is shown, they just are not added to the group as an Item.
 
If I place them on a container object, such as a frame or picturebox they add fine, but unfortuanately this is not possible in my project because additional controls are added dynamically. For example I have one of each in a project with an Index of 0. Any additional controls required are created using the load routine. As I said this works fine with Intrinsic controls, but not custom ones.
 
I do have another Explorerbar type control that this works fine with, but not with the CodeJock taskPanel.
 
Any help or insight would be appreciated.
 
Thanks,
 
Steve



Replies:
Posted By: SteveDude
Date Posted: 17 January 2008 at 2:15pm
Never Mind...Found this and it worked...
Hi, Add
property to UserControl:
 
Public Property Get hWnd() As Long
hWnd = UserControl.hWnd
End Property
 
 
and add it to TaskPanel:
  Set Item = Group.Items.Add(ID_TASKITEM_MYDOCUMENTS, "My Documents", xtpTaskItemTypeControl, 8)
 Item.SetHandle UserControl11.hWnd



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net