how to embed a icon in title bar in Mac OSX

37 views
Skip to first unread message

songhf

unread,
Nov 15, 2012, 6:19:35 PM11/15/12
to wx-u...@googlegroups.com
Hi,

i want to embed a icon in the tittle bar of my app window just like Finder App. But i could not find a way to do that. Does anyone have a clue about it?

The OS is Mac OSX 10.8.2. My wxwidget version is 2.9.4.

THX a lot.

Vadim Zeitlin

unread,
Nov 15, 2012, 8:39:16 PM11/15/12
to wx-u...@googlegroups.com
On Fri, 16 Nov 2012 07:19:35 +0800 songhf wrote:

s> i want to embed a icon in the tittle bar of my app window just like
s> Finder App. But i could not find a way to do that. Does anyone have a
s> clue about it?

This is not supported by wx because this is not portable anyhow, but you
should be able to do it relatively easily using Cocoa directly under OS X.
Searching for the relevant keywords will find many examples of doing it,
basically you just need to retrieve an existing standard button from the
title bar, get its superview and then add your custom view to it.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages