> Is this a regular button resource?  How does one cause it to be drawn
> "selected"?

Method one: selector triggers on one form, many items
In a PilRC resource file:

  PUSHBUTTON "Alarm" AlarmTab AT (1 85 AUTO 12) USABLE GROUP 1
  PUSHBUTTON "Timer" TimerTab AT (PREVRIGHT+1 86 AUTO 11) USABLE GROUP 1
  PUSHBUTTON "Calendar" CalendarTab AT (PREVRIGHT+1 86 AUTO 11) USABLE GROUP 1
  PUSHBUTTON "Zones" ZoneTab AT (PREVRIGHT+1 86 AUTO 11) USABLE GROUP 1

Then just have a ctlSelected handler for each that hides all items on the 
form, and unhides the ones you want to display.  I did some trickery with the 
IDs of the buttons to make this easier...

Method two: selector triggers on multiple forms
In a PilRC resource file: (second form)

  PUSHBUTTON "Alarm" AlarmTab AT (1 85 AUTO 12) USABLE GROUP 1
  PUSHBUTTON "Timer" TimerTab AT (PREVRIGHT+1 86 AUTO 11) USABLE SELECTED
      GROUP 1
  PUSHBUTTON "Calendar" CalendarTab AT (PREVRIGHT+1 86 AUTO 11) USABLE GROUP 1
  PUSHBUTTON "Zones" ZoneTab AT (PREVRIGHT+1 86 AUTO 11) USABLE GROUP 1

Move the "selected" label between buttons on each form.  This does make the 
code simpler (the ctlSelected code becomes a form switch) but takes up much 
resource space.  I am unsure if the "SELECTED" tag will work - if it doesn't, 
you just need to select the button in code on window init, before drawing or 
shortly after.

-- 
Matthew (Darkstorm) Bevan       [EMAIL PROTECTED]
Margin Software, NECTI.         http://www.marginsoftware.com
        Re-inventing the wheel, every time.

 - "The only real way to look younger is not to be born so soon."
                -- Charles Schulz, "Things I've Had to Learn Over and
                   Over and Over"


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to