• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: splitter and views resize problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: splitter and views resize problems


  • Subject: Re: splitter and views resize problems
  • From: Luc Vandal <email@hidden>
  • Date: Wed, 13 Jul 2005 10:38:41 -0400

Yes, they are laid out in IB. I tried what you've mentionned but it doesn't seem to work:

	NSRect rMainView;
	NSRect rStatusView;
	NSRect rTreeView;

	rMainView = [mainView bounds];
	rStatusView	= [statusView bounds];
	rTreeView		= [treeView bounds];

rMainView.size.height = totHeight * ( (float)[m_prefs USIntegerForKey:US_TEXT_WINDOW_HEIGHT] / 100.00 );
rMainView.size.width = totWidth * ( (float)[m_prefs USIntegerForKey:US_TEXT_WINDOW_HEIGHT] / 100.00 );

rStatusView.size.height = totHeight - rMainView.size.height;
rTreeView.size.width = totWidth - rMainView.size.width;
rTreeView.size.height = rMainView.size.height;


	[[aSubViews objectAtIndex:0] setFrame:rTreeView];
	[[aSubViews objectAtIndex:1] setFrame:rMainView];
	[[aViews objectAtIndex:1] setFrame:rStatusView];

Luc

On 13-Jul-05, at 10:20 AM, Tristan O'Tierney wrote:

is A, B, and C laid out in IB? you could just create outlets to them and
have a reference in your app's main controller


On 7/13/05, Luc Vandal <email@hidden> wrote:

Hi!

In my main window, I have 3 views distributed like this:

A | B
____
CCC

A = NSOutlineView
B & C = NSTextView

One thing I don't understand is that there seems to be more than 3
views overall. When I run this code:

NSArray* aViews = [splitter subviews];
NSArray* aSubViews = [[aViews objectAtIndex:0] subviews];

int nCount = [aViews count]; //returns 2, which seems ok
nCount = [aSubViews count]; //returns 5, when I guess that it should
return 2 as well?

I'm trying to resize those views on the fly but really don't know how!

Luc


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




-- Tristan O'Tierney - Email: tristan [TA] otierney <DOT> net - Homepage: http://www.otierney.net _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >splitter and views resize problems (From: Luc Vandal <email@hidden>)
 >Re: splitter and views resize problems (From: "Tristan O'Tierney" <email@hidden>)

  • Prev by Date: Re: stringWithContentsOfURL doesn't work sometimes
  • Next by Date: Re: splitter and views resize problems
  • Previous by thread: Re: splitter and views resize problems
  • Next by thread: Re: splitter and views resize problems
  • Index(es):
    • Date
    • Thread