Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Splitter » Patch request for SplitterFrame
Patch request for SplitterFrame [message #11969] Fri, 05 October 2007 12:19 Go to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I have modified my SplitterFrame to allow Hide/Show behaviour. Previously it was impossible to prevent the user from dragging a SplitterFrame (even with SetSize(0) the resize bar would be available) and the methods were hidden by private inheritance.

I've tested the changes quite thoroughly and I would be grateful if they could be added to CtrlLib.

Cheers,
James

[Updated on: Fri, 05 October 2007 16:21]

Report message to a moderator

Re: Patch request for SplitterFrame [message #11987 is a reply to message #11969] Sat, 06 October 2007 18:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
mrjt wrote on Fri, 05 October 2007 06:19

I have modified my SplitterFrame to allow Hide/Show behaviour. Previously it was impossible to prevent the user from dragging a SplitterFrame (even with SetSize(0) the resize bar would be available) and the methods were hidden by private inheritance.

I've tested the changes quite thoroughly and I would be grateful if they could be added to CtrlLib.

Cheers,
James


Thank you, patch applied.

Mirek
New Patch request for SplitterFrame [message #12193 is a reply to message #11969] Wed, 17 October 2007 11:17 Go to previous messageGo to next message
benoitc is currently offline  benoitc
Messages: 17
Registered: July 2007
Location: Nice (France)
Promising Member
Hi,

Funny, I did the same kind of patch 3 weeks ago.

I updated the Serialize function as well because it was a little bit broken (i.e. the layout was not refreshed if you loaded a size different than the original one).

I added the serialization of a new visibility flag to be able to restart the application with a Splitter that was previously hidden.

void SplitterFrame::Serialize(Stream& s)
{
	int 	version = 1;
	bool	visible = IsShown();
	
	s / version;
	s % size;
	if(version > 0)
		s % visible;
	
	if(s.IsLoading()) {
		Show(visible);
		RefreshParentLayout();
	}
}



Regards,
Benoit
Re: New Patch request for SplitterFrame [message #12201 is a reply to message #12193] Wed, 17 October 2007 19:20 Go to previous message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
Good point, thanks Smile

Mirek
Previous Topic: Splitter and SetMin strange behavior
Next Topic: Splitter::SetMinPixels() bug+fix
Goto Forum:
  


Current Time: Sun Nov 17 00:50:59 CET 2019

Total time taken to generate the page: 0.02894 seconds