• 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
Why my matrix is moving ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why my matrix is moving ?


  • Subject: Why my matrix is moving ?
  • From: kubernan <email@hidden>
  • Date: Thu, 8 Aug 2002 20:42:33 +0200

Hello,

I create dynamically a matrix of cells. Each time i create
a new row, all the matrix moves up. What i want to do is to maintain
the first row (then the entire matrix) at the same frame position.
I have the same problem when i delete a row but the matrix
is moves up....

To fix the matrix at the same place, i used something like that (each time i add a row, i use
the same solution when i suppr. a row) :

NSRect modalAttrCondFrame = [modalAttrCond frame];

NSRect newFrame={{modalAttrCondFrame.origin.x,modalAttrCondFrame.origin.y-24},{modalAttrCondFrame.
size.width,modalAttrCondFrame.size.height}};
[modalAttrCond setFrame:newFrame];
[modalAttrCond sizeToCells];
[modalAttrCond setNeedsDisplay];

It works only the first time i add a row. Adding other moves the entire matrix again.
And it sounds strange to me i have to recalculate the origin of the matrix each time a i add or
suppr. a row.
Is there any mean to simply lock the initial matrix position ?

Thx for your help.
K.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: What's the best Cocoa book around?
  • Next by Date: Re: Quick question
  • Previous by thread: Re: What's the best Cocoa book around?
  • Next by thread: NSTextView and NSRulerView
  • Index(es):
    • Date
    • Thread