thanks bernie... i do use the drawthemetextbox, but not much. this helps On Mar 29, 2005, at 11:10 AM, Bernie wrote: > For anyone intested... [is there anyone?]... I found the RP example > and another interesting workaround by RC. Unfortunately, the rgb > returned by fn GetThemeBrushAsColor is not quite the same as that used > in menu hiliting so I've bodged it with: > > ignore = fn GetThemeBrushAsColor(_kThemeBrushFocusHighlight, 32, > _true, @rgb) > long if (rgb.blue > 50000) > rgb.red = 12336 : rgb.green = 25443 : rgb.blue = 45232//blue > xelse > rgb.red = 21845 : rgb.green = 24672 : rgb.blue = 29555//graphite > end if > > Bernie > > > On Mar 29, 2005, at 16:13, Bernie wrote: > >> Jay, >> I've already spent a few hours trawling through the apple site and >> QuiXampling all my example folders but can't find anything useful. >> I'm sure Mr P posted a bit of code a while back to determine the user >> preferred menu hilite colour but I can't find it. >> I sent an example file to you and a few of the others earlier that >> will give you an idea of what I'm trying to achieve. If you didn't >> receive it, please let me know. >> Thanks >> Bernie >> >> Jay wrote: >>> Bernie, >>> I only have a moment, and I imagine you've already considered this, >>> but there have to be toolbox calls for doing all this. Have you >>> thoroughly scoured the apple site for "draw menu hilight" and the >>> every imaginable variation? >>> e-e >>> =J= a y >>> " >>> On Tuesday, March 29, 2005, at 06:17 AM, Bernie wrote: >>>> OK, simply using PaintRect() does the trick. All I need to do now >>>> is determine if system appearance prefs are set to blue or >>>> graphite. >>>> Any help appreciated. >>>> Thanks >>>> Bernie >>>> '---------- >>>> dim as Rect r >>>> dim as RGBColor rgb >>>> dim as OSStatus ignore >>>> SetRect(r, 236, 107, 586, 207) >>>> appearance window 1, "Theme Text Highlight Test", @r, >>>> _kDocumentWindowClass >>>> def SetWindowBackground(_kThemeActiveDialogBackgroundBrush, _zTrue) >>>> SetRect(r, 20, 42, 92, 58) >>>> rgb.red = 12336 : rgb.green = 25443 : rgb.blue = 45232 >>>> RGBForeColor(rgb) >>>> InsetRect(r, -8, -3) : PaintRect(r) : InsetRect(r, 8, 3) >>>> color _zWhite >>>> ignore = fn DrawThemeTextBox(fn CFSTR("Menu Title"), >>>> _kThemeMenuTitleFont, _kThemeStateActive, _true, r, _teJustLeft, >>>> _nil) >>>> color _zBlack >>>> do >>>> HandleEvents >>>> until gFBQuit >>>> '---------- >>>> >>>> I asked: >>>>> Hi Boys, >>>>> You know when we click on a menu in the menu bar and the text >>>>> turns white on a blue background?... How do I get my theme text >>>>> box to look like that? >>>>> TIA >>>>> '---------- >>>>> <code snip> > > -- >