[SOLVED] TaskPanelGroupItem SetSize Issue |
Post Reply |
Author | |
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
Posted: 09 May 2010 at 9:00am |
I have placed a ReportControl inside a PictureBox control then placed the PictureBox control inside a TaskPanelGroup.
Code: Dim Group As TaskPanelGroup Dim Item As TaskPanelGroupItem Set Group = TaskPanel.Groups.Add(1, "Group By") Group.Expanded = True Set Item = Group.Items.Add(1, "Test 1", xtpTaskItemTypeControl, 1) Set Item.Control = Picture1 Item.SetSize 0, 0, True DoEvents ReportControl.Move 0, 0, Picture1.Width, Picture1.Height However using Item.SetSize 0, 0, True autosizes but does not fit the TaskPanelGroupItem exactly! I have tried using Item.SetMargins, which I can use to correctly position the left and top margins correctly but I can't find the height and width of the TaskPanelGroupItem. Does anybody know how to resolve this issue? |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
I have since resolved this issue. I was using the SetSize and SetMargins
incorrectly the first time I looked at this, after going away for a few
minutes I realised how to resolve it... typical!!!
Code: Private Sub CreateToolbox() Dim Group As TaskPanelGroup Dim Item As TaskPanelGroupItem Set Group = TaskPanel.Groups.Add(1, "Group By") Group.Expanded = True Set Item = Group.Items.Add(1, "Test 1", xtpTaskItemTypeControl, 1) Set Item.Control = Picture1 Item.SetSize 0, 0, True Item.SetMargins -8, -5, -8, -5 End Sub Private Sub Form_Resize() ' Resize the TaskPanel on Form Resize TaskPanel.Move TaskPanel.left, TaskPanel.top, TaskPanel.Width, Me.ScaleHeight - TaskPanel.top - 120 ' Resize the rpcGroupBy ReportControl inside the PictureBox, the PictureBox gets resized automatically by the TaskPanel rpcGroupBy.Move 0, 0, picGroupBy.Width, picGroupBy.Height - 15 End Sub Result: |
|
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 |