-
July 23rd, 2009, 03:08 AM
#1
CSplitterWnd How to hide a row
I have a splitter window 1 column and 2 rows. On specific user events I want to display 2 rows else I want to hide the bottom row.
I have tried the following, but makes no visual difference, nothing changes?
// hide bottom row pane
if( show == false && mShow == true ){
mShow = false;
pWnd->SetRowInfo(1,0,0); // hide
pWnd->RecalcLayout();
}else if( show == true && mShow == false ){
pWnd->SetRowInfo(1,400,0); // show
pWnd->RecalcLayout();
mShow = true;
}
Where pWnd is the splitter. How can i programatically hide the bottom row?
Thanks in advance.
-
July 23rd, 2009, 03:36 AM
#2
Re: CSplitterWnd How to hide a row
SetRowInfo() doesn't specify the actual size, but the "idea size". It's not the same. I don't wonder you see no effect.
Maybe you can use DeleteRow() and SplitColumn() to delete and insert rows().
-
July 23rd, 2009, 03:53 AM
#3
Re: CSplitterWnd How to hide a row
Originally Posted by cilu
SetRowInfo() doesn't specify the actual size, but the "idea size". It's not the same. I don't wonder you see no effect.
Maybe you can use DeleteRow() and SplitColumn() to delete and insert rows().
I dont want to delete anything only hide a row based on what the user selects elsewhere. So it needs to toggle between showing only 1 row or 2 rows.
I understand I would need to use dynamic splitters to do what you suggest but then I dont want the user to be able to split the view from the front end.
Im happy with a static, but just need to hide bottom pane. I cant believe its so difficult, always the problem with MFC.
For now I just looking for the most easy way to hide the bottom row in a two row splitter?
-
July 23rd, 2009, 03:57 AM
#4
Re: CSplitterWnd How to hide a row
Victor Nijegorodov
-
July 23rd, 2009, 04:23 AM
#5
Re: CSplitterWnd How to hide a row
The Show Hide static panes would seem to be the one I want, the other is too much solution.
The problem with the first example, the code is for hiding/showing columns not rows.
Im not confident in rewriting it for hiding a row? Can anyone help?
Thanks for your responses so far, I feel im getting nearer...
-
July 23rd, 2009, 04:28 AM
#6
Re: CSplitterWnd How to hide a row
Originally Posted by PRMARJORAM
Im not confident in rewriting it for hiding a row? Can anyone help?...
There is an example somewhere in the comments to this article
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|