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: enter image description here

and here's looks without: enter image description here

as can see, disabled.


update

someone asked code display windows. example didn't use code. 2 screens above here steps followed:

  1. created new cocoa application using xcode. (automatically creates xib).
  2. dragged out 2 controls (text field , progress bar) onto existing window.
  3. ran, , took screen shot
  4. closed , checked off title bar attribute window.
  5. 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.

http://developer.apple.com/library/mac/#documentation/cocoa/reference/applicationkit/classes/nswindow_class/reference/reference.html#//apple_ref/occ/instm/nswindow/canbecomekeywindow

search canbecomekeywindow in above link , there sample code included explain process.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -