the TextEdit save dialog or the Printer dialog) use buttons with blue
background which even pulsates adjacent to buttons with white
background. PB always displays the buttons with a white background.
Therefore I want to demonstrate how easy it is to display a button
with blue background or with a pulsing blue background:
Code: Select all
ImportC ""
HiliteControl(ControlRef.L, HiliteState.L)
SetControlData(Control.L, ControlPartCode.L, TagName.L, BufferSize.L, *Buffer)
EndImport
#kControlButtonPart = 10
#kControlPushButtonDefaultTag = 'dflt'
DrawDefaultRing.B = #True
If OpenWindow(0, 270, 100, 200, 100, "Customized Buttons")
ButtonGadget(0, 10, 10, 180, 20, "Standard Button")
ButtonGadget(1, 10, 40, 180, 20, "Pulsing Button")
ButtonGadget(2, 10, 70, 180, 20, "Highlighted Button")
SetControlData(GadgetID(1), #kControlButtonPart, #kControlPushButtonDefaultTag, SizeOf(DrawDefaultRing), @DrawDefaultRing)
HiliteControl(GadgetID(2), #kControlButtonPart)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf