简体   繁体   中英

NSMatrix in ScrollView; origin settings are locked. Why?

I have an NSMatrix , embedded within a scroll view (using IB). It works great, using the -sizeToCells method after changing the number of rows/columns. But I would like to move the initial matrix inside the scrollview. IB grays out the X and Y settings. Why, and how would it be possible to change the origin?

IIRC, the NSScrollView or its NSClipView will always set the documentView 's origin to (0,0) . (Might be in -[NSScrollView tile] ?)

Therefore, IB disables the origin settings because they will never be used.

If your app is working correctly, I wouldn't worry about what it looks like in IB.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM