Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - TaskPanel Picturebox Overlap
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TaskPanel Picturebox Overlap

 Post Reply Post Reply
Author
Message
dlord View Drop Down
Newbie
Newbie


Joined: 25 October 2004
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote dlord Quote  Post ReplyReply Direct Link To This Post Topic: TaskPanel Picturebox Overlap
    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



Edited by dlord
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dlord View Drop Down
Newbie
Newbie


Joined: 25 October 2004
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote dlord Quote  Post ReplyReply Direct Link To This Post 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...

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dlord View Drop Down
Newbie
Newbie


Joined: 25 October 2004
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote dlord Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2004 at 8:54am
I do.....?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dlord View Drop Down
Newbie
Newbie


Joined: 25 October 2004
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote dlord Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2004 at 1:45pm
Ok. Yeah, that makes sense now. Thanks for clearing it up.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.