Splitter settings
Posted
#1
(In Topic #834)
Guru

Posted
Regular

I think it just holds the same splitter data as .Layoutcogier said
Does anybody know what Splitter.Settings do? …
For example, have a play with this:-
Posted
Guru

<IMG src="https://www.cogier.com/gambas/Splitter1.png">
</IMG>
Posted
Expert

Splitter1.Layout[20,80] will give the two child controls the available space based on a percentage calculation.
The Splitter1.Settings[0] will equal the actual size of the first child control width being used.
Note# I'm using the old HSplit control ( had not noticed that it had been depreciated.)
I'm assuming that if you set the split orientation to vertical, then the settings parameter would give the height of the controls.
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Guru

For anybody who's interested, here is a little program that shows this.
<IMG src="https://www.cogier.com/gambas/SplitterSettings.png">
</IMG> EDIT: - Help pages now updated.
Posted
Guru

See here /comp/gb.settings/settings/write - Gambas Documentation where it explains…
"This method can handle Window objects, or any control having a Settings property."
So you can use the command…
Settings.Write(Splitter1) on form close and
Settings.Read(Splitter1) on form load
1 guest and 0 members have just viewed this.

