Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - How to fix splittersize
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to fix splittersize

 Post Reply Post Reply
Author
Message
sosepe View Drop Down
Groupie
Groupie


Joined: 09 March 2007
Location: Italy
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote sosepe Quote  Post ReplyReply Direct Link To This Post Topic: How to fix splittersize
    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)

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
sosepe View Drop Down
Groupie
Groupie


Joined: 09 March 2007
Location: Italy
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote sosepe Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2013 at 4:35am
HOW! works perfect!

many many thanks!

Codejock forever! Thumbs Up

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

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.156 seconds.