osx - Subviews become disabled when title bar is hidden -
writing app in xcode osx using osx 10.8 sdk. of windows work fine, until use interface building rid of title bar in nib (i uncheck title bar
param on attributes inspector of window element). windows still show, subviews disabled. can no longer input text , process bars greyed out.
does know why happening? , how have window without title bar, subviews enabled?
here view looks title bar:
and here's looks without:
as can see, disabled.
update
someone asked code display windows. example didn't use code. 2 screens above here steps followed:
- created new cocoa application using xcode. (automatically creates xib).
- dragged out 2 controls (text field , progress bar) onto existing window.
- ran, , took screen shot
- closed , checked off
title bar
attribute window. - restarted app. took second screen shot.
there answer question @ link:
xcode 4, cocoa title bar removing interface builders disables textview editing
if read documentation nswindow can see methods canbecomekeywindow , canbecomemainwindow return no if there no title bar. sub-classing nswindow , over-riding these methods make can become key windows.
there sample code on how subclass these windows in apple's documentation website, or in xcode if have documentation installed.
search canbecomekeywindow in above link , there sample code included explain process.
Comments
Post a Comment