DrawThemeTextBox & kThemeStateInactive broken?
Subject : DrawThemeTextBox & kThemeStateInactive broken?
From: Douglas Norton <email@hidden >
Date: Thu, 28 Jul 2005 14:50:42 +0100
Delivered-to: email@hidden
Delivered-to: email@hidden
All,
When I use DrawThemeTextBox and specify a state of
kThemeStateInactive, my text appears exactly the same as when I use
kThemeStateActive.
Am I doing something wrong, or is this expected behaviour, or is it a
bug ?
I am expecting the text to look something akin to static text
controls when the window that they are in becomes inactive.
If you want to see this for yourselves, I have included some code
that builds to a sample app to illustrate this.
Thanks
Douglas
int main(int argc, char* argv[])
{
Rect windowBounds = { 50, 20, 400, 520 }; // top, left, bottom,
right
WindowRef window = NULL;
if ( noErr == CreateNewWindow( kDocumentWindowClass,
kWindowStandardDocumentAttributes
| kWindowStandardHandlerAttribute
| kWindowCompositingAttribute,
&windowBounds,
&window )
)
{
Rect textBox1 = { 10, 10, 30, 500 }; // tlbr
Rect textBox2 = { 60, 10, 80, 500 }; // tlbr
Rect textBox3 = { 110, 10, 130, 500 }; // tlbr
Rect textBox4 = { 210, 10, 230, 500 }; // tlbr
Rect textBox5 = { 260, 10, 280, 500 }; // tlbr
Rect textBox6 = { 310, 10, 330, 500 }; // tlbr
ShowWindow( window );
SetPort( GetWindowPort( window ) );
PenNormal();
DrawThemeTextBox( CFSTR("kThemeSystemFont /
kThemeStateActive"),
kThemeSystemFont,
kThemeStateActive,
false,
&textBox1,
teJustLeft,
NULL );
DrawThemeTextBox( CFSTR("kThemeSystemFont /
kThemeStateInactive"),
kThemeSystemFont,
kThemeStateInactive,
false,
&textBox2,
teJustLeft,
NULL );
DrawThemeTextBox( CFSTR("kThemeSystemFont /
kThemeStateUnavailableInactive"),
kThemeSystemFont,
kThemeStateUnavailableInactive,
false,
&textBox3,
teJustLeft,
NULL );
DrawThemeTextBox( CFSTR("kThemeSmallSystemFont /
kThemeStateActive"),
kThemeSmallSystemFont,
kThemeStateActive,
false,
&textBox4,
teJustLeft,
NULL );
DrawThemeTextBox( CFSTR("kThemeSmallSystemFont /
kThemeStateInactive"),
kThemeSmallSystemFont,
kThemeStateInactive,
false,
&textBox5,
teJustLeft,
NULL );
DrawThemeTextBox( CFSTR("kThemeSmallSystemFont /
kThemeStateUnavailableInactive"),
kThemeSmallSystemFont,
kThemeStateUnavailableInactive,
false,
&textBox6,
teJustLeft,
NULL );
RunApplicationEventLoop();
}
return 0;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.