Skip navigation.
 
mlRe: Shiny little square buttons
FROM : Jeremy Dronfield
DATE : Sun Jul 02 15:40:02 2006

On 2 Jul 2006, at 12:54 pm, Nik Youdale wrote:
>
> I am trying to make an inspector window similar to the one in Pages 
> using a row of buttons at the top to select panes. However, I can 
> not work out how to get the blue highlighting effect on these buttons.
>
> The small square bezel buttons are perfect for this, except I can't 
> make them go blue! I realize that pages uses images for their 
> buttons, but I was looking for a way without making 3 or 4 images 
> for each button.
>
> Any ideas?


The inspector tabs in Pages are an NSMatrix of NSButtonCells using 
(in most cases) only 2 images for each cell - "normal" and "selected".

(Personally, if I were doing this, I'd dispense with the background 
images and draw the gradients in code in a custom cell subclass. The 
reason being re-usability - it's easier to vary the colours, sizes 
and background shapes for different requirements.)

Regards,
Jeremy

Related mailsAuthorDate
mlShiny little square buttons Nik Youdale Jul 2, 13:54
mlRe: Shiny little square buttons Jeremy Dronfield Jul 2, 15:40
mlRe: Shiny little square buttons Nik Youdale Jul 2, 16:13
mlRe: Shiny little square buttons Andy Lee Jul 2, 16:43
mlRe: Shiny little square buttons Uli Kusterer Jul 3, 11:23
mlRe: Shiny little square buttons Nik Youdale Jul 3, 12:13
mlRe: Shiny little square buttons Uli Kusterer Jul 3, 13:06
mlRe: Shiny little square buttons George Orthwein Jul 3, 16:23
mlRe: Shiny little square buttons Gerd Knops Jul 3, 21:04
mlRe: Shiny little square buttons Ricky Sharp Jul 3, 22:28
mlRe: Shiny little square buttons Uli Kusterer Jul 4, 02:20