| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi everybody, Is there a way to have an offset between a text view and the scroll view it is embeded in? I tried setting different frames and also repositioning in super view but, right before typed text wraps, the scroll resets the text view to its own size/position. Since I added a light background color to the text view, it looks bad with the text touching the edge of the color. So I guess I need to inset the text view and give the scroll view's background the same color. Can this be done with HIView APIs at all (couldn't find it in the headers/docs)? Or do I need to use text handling calls (MLTE?) to set a margin? Any help would be great. Thanks. viewBounds.origin.x = 20.0; viewBounds.origin.y = 260.0; viewBounds.size.width = 320.0; viewBounds.size.height = 200.0; err = HIScrollViewCreate(kHIScrollViewOptionsVertScroll, &scrollView); err = HIViewSetFrame(scrollView, &viewBounds); viewBounds.origin.x = 40.0; viewBounds.origin.y = 280.0; viewBounds.size.width = 280.0; viewBounds.size.height = 160.0; err = HITextViewCreate( &viewBounds, 0, 0, &textView); err = HITextViewSetBackgroundColor( textView, bgColor); err = HIViewAddSubview(scrollView, textView); err = HIViewPlaceInSuperviewAt(textView,20.0, 20.0); err = HIViewFindByID( HIViewGetRoot(mainWindow),kHIViewWindowContentID, &contentView); err = HIViewAddSubview(contentView, scrollView); err = HIViewSetVisible(scrollView, true); err = HIViewSetVisible(textView, true); Dr. Carlos Eduardo Mello (email@hidden) Music Technology Lab, Music Department University of Brasília, Brazil |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.