Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - TabControl and VSFlexGrid
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TabControl and VSFlexGrid

 Post Reply Post Reply
Author
Message
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Topic: TabControl and VSFlexGrid
    Posted: 26 March 2007 at 11:59am
Hello,
I get a strange behavior with ComponentOne VSFlexGrid located inside a TabControl.
To simulate (VB6 environment) I use a Form with a TabControl, a TextBox and a C1 vsFlexGrid. This is the code:


Private Sub Form_Load()
    TabControl1.AutoResizeClient = True
    TabControl1.InsertItem 0, "One", Text1.hWnd, 0
    TabControl1.InsertItem 1, "Two", VSFlexGrid1.hWnd, 0
End Sub
Private Sub Form_Resize()
    TabControl1.Move 0, 0, ScaleWidth, ScaleHeight
End Sub


When I run the code, it seems all is working good. When (at run time) I select the second Tab and, simply, click on the vsflexgrid, the child loose its autoresize and shows itself with the original positions and dimensions (top, left, with, height) becoming useless.

Someone has found any trick?

Thx



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: 27 March 2007 at 1:18am
Hi,
 
You can put VSFlexGrid  to TabControl in design time (for 10.4.* version) or you can put VSFlexGrid   to PictureBox and use this picturebox in InsertItem  call.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2007 at 3:03am
Hi Oleg and thx for the reply.
I'm using 10.4.2 but I wish to setup layout at run-time. Following your suggestions I created a container for vsFlexGrid.
To get all automated (no resize event in a picturebox) I used the Component1 container (C1Elastic)


    C1Elastic1.BorderWidth = 0
    C1Elastic1.AutoSizeChildren = azUnevenHorz
    TabControl1.InsertItem 1, "Two", C1Elastic1.hWnd, 0


I noticed VSFlexGrid is the only one component that do not resize correctly. For example I tried C1 TrueDBGrid1 and all is OK.

Thank you


Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2007 at 8:54am
I have found another control (I use) that does not autoresize correctly in TabControl. The name of the control is Text Control (from The Imaging Source Europe Gmbh).

So I have to use Component1 Elastic Control to be sure the client will automatically fit the tab area.

I would like to suggest (Codejock) to modify the TabControlPage control to do this job and behave (partially) as C1 Elastic (IMHO).

Back to Top
yair-edsoft View Drop Down
Newbie
Newbie
Avatar

Joined: 14 April 2007
Location: Israel
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote yair-edsoft Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2007 at 11:52am

Hi,

add the Flex Grid to Picture Box it Will Resolve the Problem.
You can add (in the Picture Box) the C1Elatstic inside the picturebox and then the FlexGrid , in Case u have problems with the resize Event.
yair
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.203 seconds.