• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Superimpose a NSTextField over NSImageView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Superimpose a NSTextField over NSImageView?


  • Subject: Re: Superimpose a NSTextField over NSImageView?
  • From: desktoast music productions <email@hidden>
  • Date: Sun, 23 Apr 2006 21:23:07 +0200

>> On Apr 23, 2006, at 8:10 AM, desktoast music productions wrote:
>>> Is there a way to superimpose a textfield on my customView/
>>> imageView inIB,
>>> so that I can update it like any other textfield?
>>
>> Sibling views are not guaranteed to be drawn in any particular
>> order, so it might be that your image view is getting drawn after
>> the text field.
>
> Interesting? Why are there "Bring to Front" and "Sent to Back" menu
> commands in IB's Layout menu?
> If I overlap a NSImageView and a NSTextField in a window in IB these
> commands seem to do what you'd expect when you run Test Interface.
>
> - Alan

Do you really expect me to post a question like that without having tried
"Bring to Front" and "Sent to Back" and the like at least a hundred times?
But seriously -  I also made the text field a subview of the image view from
the very beginning. (They don't just overlap - the text field is completely
ON the image.)

Here is what I do:
- In IB I create a custom view of size 507 x 320
- I put a NSImageView with of the same size on it.
- I set the image view's image to my splash image (.psd file, 507 x 320 as
well)
- I put a NSTextField (miniSystemFont, blue textcolor, draws no background)
onto the image view.

And this is what I get:
- As soon as I press Command-R the text field disppears (the same would
happen to buttons, etc.)

Due to the hints I received from this list, I tried adding the text field as
subview of the image view programmatically. This time the status line text
field really showed up im my splash - with a new unwanted side effect: it
looks as if the text field draws its background kind of gray (the image is
white, and - yes - I tried setting drawsBackground to NO in code, too).
But I guess, this is not the text field's background, I guess, my image just
does not draw, where overlapped by the text field...?

I put a screenshot of my splash online at:
http://www.autlawmusic.com/cocoa/WDVSplash.html
Just to give you an idea of what I'm doing here.

Thanks for all the input,
Peter
--
Leselust...?
http://www.peterschwaiger.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Superimpose a NSTextField over NSImageView?
      • From: Alan Hart <email@hidden>
    • Re: Superimpose a NSTextField over NSImageView?
      • From: Andy Lee <email@hidden>
References: 
 >Re: Superimpose a NSTextField over NSImageView? (From: Alan Hart <email@hidden>)

  • Prev by Date: Animated split view collapsing
  • Next by Date: Re: Superimpose a NSTextField over NSImageView?
  • Previous by thread: Re: Superimpose a NSTextField over NSImageView?
  • Next by thread: Re: Superimpose a NSTextField over NSImageView?
  • Index(es):
    • Date
    • Thread