[futurebasic] RE: [FB] Platinum look

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Mon, 13 Sep 1999 02:35:28 -0400
Sylvain Guillemette asked:

>I would like to give my apps the platinum look, even on older
>OS versions. I don't want to use the appearance manager coz you
>never know how things will look like on different OSes.
>The hardest part is the controls (buttons, scroll bars etc.).
>Instead of writing my own CDEFs, i decided to try to use OS 8.6's
>control definitions (see, and try if you want, the source code below).
>The questions are:
>1) Can i use the CDEFs from OS 8.6 in my apps ?
>2) How do i get the value of a slider control (for example) ?
>3) How can i tell my app to use the CDEFs in my resfile ? (instead 
>of the OS defaults)
>4) What is the magic behind these control numbers ?!??? Any formulas
>i should know ? any rules ?


A short time ago I posted a similar question but it failed to make 
the list. Since then, I have been researching CDEFs and the 
Appearance Manager and have made some discoveries that may help you. 
(I have not yet received my copy of FB^3, and have no way of knowing 
if this information will be obsoleted or not. In my initial post, I 
asked if FB^3 is Appearance Manager compliant, but my question 
remains unanswered.)

Several new MacOS system controls can safely be called and utilized 
with the FBII "BUTTON" statement. These basically include some nice 
new 3-D buttons. The new buttons offer more states than what we are 
used to in FBII. The new states include: inactive (grayed out), 
active, marked and mixed. The latter is a new one and I'm still 
waiting to see how it can best be used.

With other new controls, you use the FBII BUTTON statement to open 
and view the control (sliders, spinners and pop-up menus included) 
but the BUTTON statement does not offer enough parameters to utilize 
the new controls.

At first I thought the only way to call those controls was by 
hard-coding from resource files-- a process still beyond my ability.

But recently I have discovered that it is possible to call and use at 
least some of the new controls-- which already are embedded in the 
System file and Appearance Manager--directly from FBII.

In a subsequent posts, I will include some demonstration code. If you 
have old issues of InsideBASIC or the InsideBASIC CD in Issue 53 
there are two helpful articles: Understanding Control Definitions, by 
Raoul Watson, and a follow-up, Using Other People's CDEFs, by Ross 
Lambert. These articles will help you understand how to set the 
enhance control parameters from with FBII.

I recommend that everyone on the list download Apple's Appearance 
Manager software development kit. It's a 3.8 meg file, but includes a 
wonderful 500k demo of many of Appearance Manager's new features that 
will leave you drooling. (Be sure to check out the various menu 
functions!) If you would just like to look at the official Apple demo 
without downloading the entire file, e-mail me offline. The file also 
includes the latest edition of Appearance Manager, v. 1.0.4, which 
fixes some major bugs. You can download it at:


The Apple download includes a Resourcer file with the new Appearance 
Manager templates. If you only have ResEdit, you can modify it to 
include the same templates with this file:


I will have a follow-up to this post with some code.

Ken Shmidheiser               Systems Administrator/General Manager

Internet: kshmidheiser@...    Fax:  606.679.9225
Somerset, KY 42502-0221                        Phone:  606.679.4266