Oops I triggered an update (HSplit and VSplit is now Splitter)

Post

Posted
Rating:
#1 (In Topic #622)
Guru
BruceSteers is in the usergroup ‘Guru’
So all it started with me using the new html previewer in the IDE.

I wished it could split horizontally and not just vertically as it would have been handy with the doc i was editing.
I had a look at the gambas code and it was all a bit beyond me so..

So yesterday evening i went to the bugtracker and submitted a "Request" and asked Benoit nicely if it might be possible to make the previewer do that.
Then i went to off work to clean the doctors.

Half way through my shift i thought , actually wouldn't it be cool if a HSplit or VSplit could change orientation?
There'd be loads of uses for that.

So after work i had another look at gambas code but this time at the HSplit, VSplit and their parent class _Split.
I found a way and added a function Switch() to _Split
That allowed either HSplit or VSplit to change just like that :)
The code looked good, functionally cool.
I I explained on the bugtracker request that I'd had a better idea to make splitters swappable and submitted a merge request…….

Then in the afternoon i have been working on a roof and by the time i'd finished Benoit has agreed the Split view being able to change is a good idea but not the way i did it so he's made a better way to handle Splits with only one class instead of 3 but now HSplit and VSplit have become depreciated and there is a new split panel class called Splitter and it is Horizontal or Vertical by setting the Arrangement property.

I tested it out by using it on the gambas html previewer ……
<VIDEO content="http://bws.org.uk/images/screenrecord-2021-03-18_19.00.04.mp4">[video]
[/video]</VIDEO>

It works a treat :)
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Enthusiast
PJBlack is in the usergroup ‘Enthusiast’

BruceSteers said

It works a treat :)

äääähm …

- splatter needs a nice icon in the tool bar

- setting a editor window to spilt vertically :
 

Code

This application has raised an unexpected error and must abort.
Invalid object (#29).
ScrollArea.ScrollArea_Arrange.457
[Ignore] then again
 

Code

This application has raised an unexpected error and must abort.
Invalid object (#29).
ScrollArea.ScrollArea_Arrange.457
[Ignore] then it show up right …

setting a editor window to spilt horizontally works fine.

- crying at a very top-level: trying to split one of the splitted did clear the splitting
Online now: No Back to the top

Post

Posted
Rating:
#3
Guru
BruceSteers is in the usergroup ‘Guru’

PJBlack said

BruceSteers said

It works a treat :)

äääähm …

- splatter needs a nice icon in the tool bar

- setting a editor window to spilt vertically :
 

Code

This application has raised an unexpected error and must abort.
Invalid object (#29).
ScrollArea.ScrollArea_Arrange.457
[Ignore] then again
 

Code

This application has raised an unexpected error and must abort.
Invalid object (#29).
ScrollArea.ScrollArea_Arrange.457
[Ignore] then it show up right …

setting a editor window to spilt horizontally works fine.

- crying at a very top-level: trying to split one of the splitted did clear the splitting

er what do you mean setting an editor window?  only the Splitter container can do this.

I've used it on a few things , had no problems at all.
It's essentially no different to the old HSplit VSplit that used to use _Split.class and set the arrangement at creation, now arrangement can be switched.

You'll have to watch how the objects inside are set up though to be sure they can take a dual mode split , probably best to put them in their own panels and only set alignment/arrangement of things inside.

it's probably the layout of your objects than make it go wrong in vertical.
there's always a way fella :)
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Enthusiast
PJBlack is in the usergroup ‘Enthusiast’
 ok forget about it …

i thought that ide editor uses internally the hsplit/vsplit to split the code window
Online now: No Back to the top

Post

Posted
Rating:
#5
Guru
BruceSteers is in the usergroup ‘Guru’

PJBlack said

ok forget about it …

i thought that ide editor uses internally the hsplit/vsplit to split the code window

aah.
no it's splPreview  
currently a HSplit , convert it into Splitter :)
I've submitted a merge request so hopefully it will be in gambas soon anyway :)
Online now: No Back to the top

Post

Posted
Rating:
#6
Guru
BruceSteers is in the usergroup ‘Guru’
Here's the link to the changes i made to make the previewer work as other things do in gambas (using a toolbutton and the toolbar actions)

https://gitlab.com/bsteers4/gambas/-/tree/previewer-arrange
Online now: No Back to the top
1 guest and 0 members have just viewed this.