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 » U++ Widgets - General questions or Mixed problems » How to hide a TopSeparatorFrame
How to hide a TopSeparatorFrame [message #14863] Tue, 18 March 2008 15:40 Go to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
How would one best hide and show a TopSeparatorFrame (or the other equivalents). I could make the TopSeparatorFrameClass public for one and add the methods. Is there another way which doesn't add extra public names? Anyway, those classes are visible in Assist++ so it shouldn't be a problem.
Re: How to hide a TopSeparatorFrame [message #14866 is a reply to message #14863] Tue, 18 March 2008 16:36 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Since TopSeparatorFrame is just a CtrlFrame (no Ctrl inheritance) IMO it would be easiest just to use AddFrame (or InsertFrame) and RemoveFrame as necessary.
Re: How to hide a TopSeparatorFrame [message #14869 is a reply to message #14866] Tue, 18 March 2008 17:35 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
mrjt wrote on Tue, 18 March 2008 17:36

Since TopSeparatorFrame is just a CtrlFrame (no Ctrl inheritance) IMO it would be easiest just to use AddFrame (or InsertFrame) and RemoveFrame as necessary.

Yes, but CtrlFrame is an abstract class, so I can not declare a variable with this type and use it to store the value from TopSeparatorFrame().

Also the frame I want to hide is deep in a nest of layouts and other frames, and I don't know if Add/Remove method would maintain the "Z"-order.
Re: How to hide a TopSeparatorFrame [message #14872 is a reply to message #14869] Tue, 18 March 2008 18:04 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
It should work (I've done similar things before). If you've only got one TopSeparatorFrame:

	
...
		ctrl.AddFrame(ViewFrame());
		ctrl.AddFrame(TopSeparatorFrame());
		ctrl.AddFrame(ViewFrame());
...
	void RemoveSeparator()
	{
		framepos = ctrl.FindFrame(TopSeparatorFrame());
		ctrl.RemoveFrame(framepos);	
	}

        void AddSeparator()
	{
		ctrl.InsertFrame(framepos, TopSeparatorFrame());
	}	
(framepos is a member variable, natch)

It'll be a bit more difficult if you've got more than one TopSeparatorFrame, but it should be possible with more specific information about the layout.

James

[Updated on: Tue, 18 March 2008 18:16]

Report message to a moderator

Re: How to hide a TopSeparatorFrame [message #14879 is a reply to message #14872] Tue, 18 March 2008 21:58 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Indeed, it does work as expected. Tank you! Once again, you knowledge of the library is impressive.

Another question: menu items which never had a call to Check look like all other items, but ones that had a Check call, even with the false parameter have an empty check box icon. This is intentional, I suppose?
Re: How to hide a TopSeparatorFrame [message #14882 is a reply to message #14879] Tue, 18 March 2008 22:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Tue, 18 March 2008 16:58

Indeed, it does work as expected. Tank you! Once again, you knowledge of the library is impressive.

Another question: menu items which never had a call to Check look like all other items, but ones that had a Check call, even with the false parameter have an empty check box icon. This is intentional, I suppose?


Definitely Smile

Mirek
Re: How to hide a TopSeparatorFrame [message #14884 is a reply to message #14882] Tue, 18 March 2008 22:26 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
luzr wrote on Tue, 18 March 2008 23:24

cbpporter wrote on Tue, 18 March 2008 16:58

Indeed, it does work as expected. Tank you! Once again, you knowledge of the library is impressive.

Another question: menu items which never had a call to Check look like all other items, but ones that had a Check call, even with the false parameter have an empty check box icon. This is intentional, I suppose?


Definitely Smile

Mirek

I don't like them Laughing. But this is the least of my worries Smile.
Previous Topic: exception failure
Next Topic: Screen coordinates to Printer coordinates Conversion?
Goto Forum:
  


Current Time: Mon Apr 29 14:42:10 CEST 2024

Total time taken to generate the page: 0.02968 seconds