wxIFM - Remove the 'X' button? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
eranif
Moderator
Moderator
Posts: 610
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

wxIFM - Remove the 'X' button?

Post by eranif »

Hi,

I have 2 questions:

1. Is there a way to remove the 'x' button from a docking window?

My goal here is to use as content window one of the docking windows since I want the blue caption (on windows anyways) to appear for the content window as well

2. Is there a way to change the background color of the caption?

Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org
TanEk
Knows some wx things
Knows some wx things
Posts: 39
Joined: Thu Sep 08, 2005 10:23 pm

Post by TanEk »

I have 2 questions:

1. Is there a way to remove the 'x' button from a docking window?
I think it is impossible... I searched this option too because I wanted a component not to be quitable but with any success :/.
SnakeChomp
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 235
Joined: Sun Oct 10, 2004 2:53 am

Post by SnakeChomp »

I will say this: Do not make the content window dockable. wxIFM is not designed to function without a content window, and the fact that it does so is just because it took 5 minutes to enable the functionality. Please simply specify your content window as the content window without making it dockable.

You can remove the "X" from a window by setting data.m_hideable = false; in the DefaultChildData when adding a child to wxIFM. This prevents that window from being hidden by the user. Warning:This value may not be respected through the entire library. Not respecting this value is considered to be a bug. Please report instances where this value is not respected. It would of course be preferable if you fixed instances where it is not respected and reported the bug with a patch included. =)

p.s. This value was documented here: http://www.snakesoft.net/wxifm/docs/htm ... _base.html I admit it is not in an obvious spot and I will correct this and update the documentation.

Edit: I updated the online documentation and the member is now documented at http://www.snakesoft.net/wxifm/docs/htm ... _data.html as well.
TanEk
Knows some wx things
Knows some wx things
Posts: 39
Joined: Thu Sep 08, 2005 10:23 pm

Post by TanEk »

Code: Select all

	m_canvas = new O3SGLCanvas(this, wxID_ANY,
						       wxDefaultPosition, wxDefaultSize);
	data->m_name = _("Renderer");
	data->m_orientation = IFM_ORIENTATION_RIGHT;
	data->m_child = m_canvas;
	data->m_hideable = O3D_FALSE; 
	data->m_tabify = O3D_FALSE;
This doesn't work with wxIFM 1.0.4. I have tried this many times ago. My Renderer can be hided...

wxIFM 1.0.5 has been released. I will make the update and try this feature.
TanEk
Knows some wx things
Knows some wx things
Posts: 39
Joined: Thu Sep 08, 2005 10:23 pm

Post by TanEk »

I have tried with wxIFM 1.0.5. The hideable option doesn't work (we can see that in the demo1...). I have found 2 bugs in the demo1 :

dock the component containg "Classes|Files|Files" in the top. There is a draw bug. Also dock the tab Files in the top. Another bug...
SnakeChomp
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 235
Joined: Sun Oct 10, 2004 2:53 am

Post by SnakeChomp »

If by "draw bug" you mean "components overlap" just make the window bigger. This has existed since before 1.0.
TanEk
Knows some wx things
Knows some wx things
Posts: 39
Joined: Thu Sep 08, 2005 10:23 pm

Post by TanEk »

And how about the hideable ?
SnakeChomp
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 235
Joined: Sun Oct 10, 2004 2:53 am

Re: wxIFM - Remove the 'X' button?

Post by SnakeChomp »

eranif wrote:1. Is there a way to remove the 'x' button from a docking window?
To remove the "X" button, set wxIFMDefaultChildData::m_hideable to false when you add the child to wxIFM. However, in wxIFM 1.0.5 the functionality does not work. There is a patch available to get this functionality working again in this thread: http://forums.wxwidgets.org/viewtopic.php?t=5359
2. Is there a way to change the background color of the caption?
Yes there is. As of wxIFM 1.0.5, certain "look and feel" settings can be configured. To change the background color, you would do this:

Code: Select all

wxIFMCaptionConfig &config = wxIFMDefaultPanelPlugin::GetCaptionConfig();
config.set_caption_color(wxColour(50,50,50));
Be sure to call wxInterfaceManager::UpdateConfiguration() after changing any configuration information.

Documentation for configuration stuff:
http://www.snakesoft.net/wxifm/docs/htm ... 5fbaf42fc0
http://www.snakesoft.net/wxifm/docs/htm ... lugin.html
http://www.snakesoft.net/wxifm/docs/htm ... onfig.html
http://www.snakesoft.net/wxifm/docs/htm ... onfig.html
Post Reply