• 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: Changing order of views dynamically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing order of views dynamically


  • Subject: Re: Changing order of views dynamically
  • From: PGM <email@hidden>
  • Date: Mon, 19 Mar 2007 10:15:07 -0400


On 19-Mar-07, at 5:31 AM, Sergey Shapovalov wrote:

Michael, thank you for your answer!

Let me explain what I'm going to achieve in the result (I think I had to start with this in my original post). In my application, I have a horizontal scroll view. I can add controls to the scroll view dynamically at run time. Consider these controls as buttons, though actually these are some custom controls. I can also drag these controls to the left and to the right inside this scroll view.

Now why I need changing order of views (controls actually) on the fly. Originally I have controls (left to right) C1, C2, C3 in the scroll view. They are ordered C1 below C2 below C3 in case they overlap. Then I begin dragging, and C3 appears between C1 and C2. At this moment, I want the order to change and become C1 below C3 below C2 (I want left controls always be below right controls).

Is there a way to implement this functionality?

And what about nesting controls - what is this and can it work in my case? Sorry if this is a naive question, but I'm relatively new with Cocoa... Is nesting a kind of grouping? Where can I read about it?

Best regards,
Sergey.

If you need to swap views dynamically, you can put them in a borderless NSTabView and then change the tab programmatically. This also makes your nib easier to maintain than having a nib with overlapping views (which is, as stated anyway not supported).


Cheers, Patrick
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Changing order of views dynamically
      • From: Sergey Shapovalov <email@hidden>
References: 
 >Changing order of views dynamically (From: Sergey Shapovalov <email@hidden>)
 >Re: Changing order of views dynamically (From: Michael Watson <email@hidden>)
 >Re: Changing order of views dynamically (From: Sergey Shapovalov <email@hidden>)

  • Prev by Date: Re: Setting the Key window after sheet ends
  • Next by Date: Re: Changing order of views dynamically
  • Previous by thread: Re: Changing order of views dynamically
  • Next by thread: Re: Changing order of views dynamically
  • Index(es):
    • Date
    • Thread