[Gambas-user] Restoring position in an HSplit
Tobias Boege
taboege at ...626...
Tue Nov 24 11:01:53 CET 2015
On Tue, 24 Nov 2015, Rolf-Werner Eilert wrote:
> I've got an HSplit which fills the main area in my application.
>
> The HSplit contains a TreeView on the left and a TabStrip on the right.
>
> Of course, the HSplit makes one bar in the middle when running. When the
> program starts, the position of the bar is set to 50 % automatically. Of
> course, the user can grab it and slide it to another position once the
> program is running.
>
> I would like to store this user position, but I do not find a property
> of HSplit for it. When I save TreeView.Width and try to set it when the
> program starts (Form_Open), it's overwritten.
>
> What can I do?
With gb.settings it's as easy as:
Public Sub Form_Close()
' Save
mySettings.Write(myHSplit)
End
Public Sub Form_Open()
' Restore with default a 1:2 ratio split
mySettings.Read(myHSplit,, [1, 2])
End
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list