split screen

Is it possible to create a split screen that can be resized from the middle to the left or right, like the iPad split screen function?

Certainly. You can create a splinter control using the Canvas control or buy a third party splitter control. There might be an example project that ships with Xojo that shows how to do the actual splitting.

Einhugur has a very nice splitter control as part of their plugins.

http://www.einhugur.com/

Specifically:

http://www.einhugur.com/Html/WindowSplitter/index.html

Thanks Geoff and Kem.

TTsMarsSplitterDemo is a good one and free to use. (Which I think is Thomas Templeton and I forget Mars, name)

Peter, I downloaded a splitter that works well. It is free. I have to find it though and then post the link.

Peter, I the control was written by Seth Willits. I have the files but I don’t know how to upload them (or even if you can). If you give me your email address I can email them to you.

Here you can download an example project on how to do splitters in Xojo, without plugin. It can handle controls and container-controls.
Oliver

http://osswald.com/rb/examples/imSplitter.zip

[quote=15397:@Oliver Osswald]Here you can download an example project on how to do splitters in Xojo, without plugin. It can handle controls and container-controls.
Oliver

http://osswald.com/rb/examples/imSplitter.zip[/quote]
I can use that! Thank you Oliver :slight_smile:

BTW: If you use that imSplitter class of mine, I would recommend to subclass it for usage in your own project. Then, if ever you need more features or power, you could replace it easily with the Einhugur splitter, which has more to offer.

Just tried it, very nice Oliver!

Very nice splitter Oliver, it just flickers a lot on windows.
Do you have any advise how to avoid or reduce it?

The doublebuffer setting doesn’t seems to help.

Thanks.

Very nice splitter Oliver, it just flickers a lot on windows.
Do you have any advise how to avoid or reduce it?

The doublebuffer setting doesn’t seems to help.

Thanks.

Reducing flicker on Windows is an art in itself … you can find many posts and articles on that.

It also depends on how one implements containercontrols. As soon as it comes to resizing / moving, then there is a great chance that containers and controls start to flicker, on Windows.

I already had some success with temporarily switching off life-resize on Windows while resizing a Window or moving a splitter. This is how the flicker problem was worked around in Office 2003, for instance in Outlook.

You can try to use the Einhugur splitter, but I believe the problem is not the splitter, but in general how one deals with controls on Windows.

Anyway, one can try this:

A Window’s Activate event handler:

Sub Activate() #If TargetWin32 Call imSetFullWindowDrag(0) #endif End Sub

The Deactive handler:

Sub Deactivate() #If TargetWin32 Call imSetFullWindowDrag(OriginalSystemFullWindowDragSetting) #endif End Sub

[code]Function imSetFullWindowDrag(IsOff As Integer = 0) As Integer
Dim i As Integer = 0
#If TargetWin32
Declare Function SystemParametersInfo Lib “user32” _
Alias “SystemParametersInfoA” (uAction As Integer, _
uParam As Integer, lpvParam As Integer, _
fuWinIni As Integer) As Integer

If IsOff <> 0 Then IsOff = 1
i = SystemParametersInfo(SPI_SETDRAGFULLWINDOWS,IsOff,0,0)

#EndIf
Return i
End Function
[/code]

Const SPI_SETDRAGFULLWINDOWS = 37
OriginalSystemFullWindowDragSetting As Integer = 0

You can download an example project for Windows here.

It retrieves the current setting from Performance Options, ‘Show window contents while dragging’ and whenever the example Window is activated, this is switched off. It is switched back to the original state on deactivation.

Example Project

I’ll try your suggestion ASAP.
Thanks for the support Oliver.

[quote=32182:@Oliver Osswald]Reducing flicker on Windows is an art in itself … you can find many posts and articles on that.

It also depends on how one implements containercontrols. As soon as it comes to resizing / moving, then there is a great chance that containers and controls start to flicker, on Windows.

I already had some success with temporarily switching off life-resize on Windows while resizing a Window or moving a splitter. This is how the flicker problem was worked around in Office 2003, for instance in Outlook.

You can try to use the Einhugur splitter, but I believe the problem is not the splitter, but in general how one deals with controls on Windows.

Anyway, one can try this:

A Window’s Activate event handler:

Sub Activate() #If TargetWin32 Call imSetFullWindowDrag(0) #endif End Sub

The Deactive handler:

Sub Deactivate() #If TargetWin32 Call imSetFullWindowDrag(OriginalSystemFullWindowDragSetting) #endif End Sub

[code]Function imSetFullWindowDrag(IsOff As Integer = 0) As Integer
Dim i As Integer = 0
#If TargetWin32
Declare Function SystemParametersInfo Lib “user32” _
Alias “SystemParametersInfoA” (uAction As Integer, _
uParam As Integer, lpvParam As Integer, _
fuWinIni As Integer) As Integer

If IsOff <> 0 Then IsOff = 1
i = SystemParametersInfo(SPI_SETDRAGFULLWINDOWS,IsOff,0,0)

#EndIf
Return i
End Function
[/code]

Const SPI_SETDRAGFULLWINDOWS = 37
OriginalSystemFullWindowDragSetting As Integer = 0

I am using imSplitter.and it flicker so much.
when the layout simply is
Left : containcontroll holds a tabpanel,and tabpanel holds a listbox
Right: containcontroll only

when drag the splitter,Left is flick so much in windows and I have set each of them “erasebackground” to false.

is this suite for my case?

you have GDI Plus on?

App.UseGDIPlus = true

[quote=297866:@Axel Schneider]you have GDI Plus on?

App.UseGDIPlus = true

yes ,of course… I try a a lot property to exam it…

and the listbox is “doublebuffer”