Print Page | Close Window

How to fix splittersize

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=21799
Printed Date: 24 April 2024 at 9:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to fix splittersize
Posted By: sosepe
Subject: How to fix splittersize
Date Posted: 17 July 2013 at 6:57am
Hello, 
it's possible to fix the size/position of splitter ?
I need to have always the same width of the description column.
Now i set a splitterpos value and when resize the window che size of the column change so i don't see description column complete.

Many thanks for the help
(and sorry for bad english)




Replies:
Posted By: jpbro
Date Posted: 18 July 2013 at 8:37am
The SplitterPos parameter sets the position of the splitter as a percentage of the width of the control.  So let's say you want to lock the splitter at 2500 Twips from the left edge of the control. You will need to recalculated whenever you resize the PropertyGrid. Something like this should work:


Private Sub Form_Load
   Me.ctlPropertyGrid.VariableSplitterPos = False   ' Turn off the splitter UI so the user can't resize it
End Sub

Private Sub Form_Resize
   Const c_SplitterWidthTwips As Long = 2500

   With Me.ctlPropertyGrid
      .Move 0, 0, Me.ScaleWidth, Me.ScaleHeight ' Fill the PropertyGrid to the window
      .SplitterPos = c_SplitterWidthTwips / .Width ' Set the splitter position to the desired % of the control width
   End With
End Sub



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: sosepe
Date Posted: 19 July 2013 at 4:35am
HOW! works perfect!

many many thanks!

Codejock forever! Thumbs Up



Posted By: jpbro
Date Posted: 19 July 2013 at 11:19am
Glad to help!


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




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