Hiding children of view with height == 0
Hiding children of view with height == 0
- Subject: Hiding children of view with height == 0
- From: Ross Carter <email@hidden>
- Date: Tue, 24 Nov 2009 12:44:29 -0500
Thanks, Patty and Mike, for quickly answering my question about NSSegmentedControl.
I have some NSView subclasses that are hidden from view by setting their height to 0. I use this rather than setHidden:NO because the height is set by an animation, which makes the views look like they are rolling up.
It looks like AX subviews of hidden views, but not views that have 0 height or views that are not visible on screen because they are clipped. In those situations, I am doing this in the view subclass:
- (id)accessibilityAttributeValue:(NSString *)attribute {
if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) {
if ([self frame].size.height < 1.0) {
return nil;
}
}
return [super accessibilityAttributeValue:attribute];
}
Is that the correct approach?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden