Print Page | Close Window

TaskPanel Picturebox Overlap

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1455
Printed Date: 12 July 2025 at 12:44am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TaskPanel Picturebox Overlap
Posted By: dlord
Subject: TaskPanel Picturebox Overlap
Date Posted: 24 November 2004 at 9:00pm

Wonder if I could get some ideas on what might be the trouble here. I've build several TaskPanelGroups using Pictureboxes. All seems well except the top of the picturebox overlaps into the Caption of the task group. See the red arrow below.

 ***** Code Used ********

    Set Group = wndTaskPanel.Groups.Add(0, "Search Database")
    Group.Tooltip = "Create custom searches"
    Group.CaptionVisible = True
    Group.Items.Add 100, "", xtpTaskItemTypeText
    Group.Items.Add 100, "", xtpTaskItemTypeText
    Group.Items.Add 100, "", xtpTaskItemTypeText
    Group.Items.Add 100, "", xtpTaskItemTypeText
    Group.Items.Add 100, "", xtpTaskItemTypeText


    Set Item = Group.Items.Add(0, " ", xtpTaskItemTypeControl)
    Set Item.Control = Picture1
    Picture1.BackColor = Item.BackColor
    Label1.BackColor = Item.BackColor
    Group.Expanded = False
   
    Set Group = wndTaskPanel.Groups.Add(0, "Report Views")
    Group.Tooltip = "Save and Open Report Views"
    'Group.Items.Add 100, "", xtpTaskItemTypeText
    'Group.Items.Add 100, "", xtpTaskItemTypeText
    'Group.Items.Add 100, "", xtpTaskItemTypeText
    'Group.Items.Add 100, "", xtpTaskItemTypeText
    'Group.Items.Add 100, "", xtpTaskItemTypeText


    Set Item = Group.Items.Add(0, "", xtpTaskItemTypeControl)
    Set Item.Control = Picture2
    Picture2.BackColor = Item.BackColor
    Label5.BackColor = Item.BackColor
    Label2.BackColor = Item.BackColor
    Label3.BackColor = Item.BackColor
    Group.Expanded = False

    wndTaskPanel.Reposition

***** End Code *****

As seen, I can pad with -   Group.Items.Add 100, "", xtpTaskItemTypeText

Which is a work around, but not sure why the trouble. In the Tasklist sample this doesn't occur.

What am I overlooking?

Thanks




Replies:
Posted By: Oleg
Date Posted: 25 November 2004 at 1:53am

Sorry, we don't change parent for control in our sources. In next version we will fix it.

Now you can manually set it:

Private Declare Function SetParent Lib "user32" (ByVal hwnd As Long, ByVal hwnd As Long) As Long

and for each control:

SetParent Picture1.hwnd, wndTaskPanel.hwnd
SetParent Picture2.hwnd, wndTaskPanel.hwnd

Thank you for letting us know.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: dlord
Date Posted: 25 November 2004 at 9:20am

Thanks for the reply. I'm noticing in the Taskpanel sample code does not have any hwnd. It works fine. I'm wondering the difference..?Here is the code from the sample...

    Set Group = wndTaskPanel.Groups.Add(0, "When was it modified?")
    Set Item = Group.Items.Add(0, "", xtpTaskItemTypeControl)
    Set Item.Control = panelModified
    panelModified.BackColor = Item.BackColor
        
    Set Group = wndTaskPanel.Groups.Add(0, "What size is it?")
    Set Item = Group.Items.Add(0, "", xtpTaskItemTypeControl)
    Set Item.Control = panelSize
    panelSize.BackColor = Item.BackColor

Any thoughts on the differences...



Posted By: Oleg
Date Posted: 25 November 2004 at 11:57pm
The difference is that you have offset from top of the form equal Caption.Height

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: dlord
Date Posted: 26 November 2004 at 8:54am
I do.....?


Posted By: SuperMario
Date Posted: 29 November 2004 at 10:50am
I will try to help.  I think the difference from your project and the sample is that you have a ShortcutCaption control above your TaskPanel, where the sample has nothing placed above it.

Oleg has fixed this and it will be available in the next release.

Use Oleg's code above until the next release.


Posted By: dlord
Date Posted: 29 November 2004 at 1:45pm
Ok. Yeah, that makes sense now. Thanks for clearing it up.



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