Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
RGB Hex Module
Library dmm_xls for work with Microsoft Excel files
Error 32- Valentina
Animated Slider Puzzle by J.R.D.R.
Digital Clock Puzzle
Director To Go
Cut, Copy, Paste behavior 1.1
NailPolish
Change the LineSize of a Shape Sprite
Text Encryption
MediaMacros Xtras Mall
 

 

 

Behavior Generic behavior to set System Colors

Added on 1/21/2002

 

Compatibilities:
behavior D6_5 D7 D8 D8_5 PC UK US

Required Xtras:
Desktop Xtra

This item has not yet been rated

Author: Shockdev

Allows to set RGB color for all desktop items

-- Generic behavior to set System Colors
-- Desktop Xtra 1.0 or later required
-- Compatibilities: Director 6.x, 7.x, 8.x, Windows

property Elements, OldScheme
property Activewndtitle, Activewndtitlegradient, Appworkspace, Desktop, Buttontext, Captiontext
property Highlight, Highlighttext, Inactivewndtitle, Inactivewndtitlegradient, Inactivewndtitletext
property Menubackgrnd, Menutext, Windowbackgrnd, Windowtext

on getPropertyDescriptionList
  set description = [:]
  addProp description, #Activewndtitle, [#default: "0,0,0", #format:#string, #comment:"Active window title bar (R,G,B):"]
  addProp description, #Activewndtitlegradient, [#default: "0,0,0", #format:#string, #comment:"Active window right side (R,G,B):"]
  addProp description, #Appworkspace, [#default: "0,0,0", #format:#string, #comment:"Backgroung for apps (R,G,B):"]
  addProp description, #Desktop, [#default: "0,0,0", #format:#string, #comment:"Desktop (R,G,B):"]
  addProp description, #Buttontext, [#default: "0,0,0", #format:#string, #comment:"Text on push buttons (R,G,B):"]
  addProp description, #Captiontext, [#default: "0,0,0", #format:#string, #comment:"Text in caption, size box and and scroll bar arrow box (R,G,B):"]
  addProp description, #Highlight, [#default: "0,0,0", #format:#string, #comment:"Items selected in a control (R,G,B):"]
  addProp description, #Highlighttext, [#default: "0,0,0", #format:#string, #comment:"Text of items selected in a control (R,G,B):"]
  addProp description, #Inactivewndtitle, [#default: "0,0,0", #format:#string, #comment:"Inactive window title bar (R,G,B):"]
  addProp description, #Inactivewndtitlegradient, [#default: "0,0,0", #format:#string, #comment:"Inactive window right side(R,G,B):"]
  addProp description, #Inactivewndtitletext, [#default: "0,0,0", #format:#string, #comment:"Text in an inactive caption (R,G,B):"]
  addProp description, #Menubackgrnd, [#default: "0,0,0", #format:#string, #comment:"Menu background (R,G,B):"]
  addProp description, #Menutext, [#default: "0,0,0", #format:#string, #comment:"Text in menus (R,G,B):"]
  addProp description, #Windowbackgrnd, [#default: "0,0,0", #format:#string, #comment:"Window background (R,G,B):"]
  addProp description, #Windowtext, [#default: "0,0,0", #format:#string, #comment:"Text in windows (R,G,B):"]
  return description
end

on getBehaviorDescription
  return "            " & ¬
  "- -    System Color Behavior    - -" & RETURN & ¬
  "Sets color for all system elements."
end

on mouseDown
  -- List of elements for which we change the color
  set Elements = []
  add Elements, "Activewndtitle"
  add Elements, "Activewndtitlegradient"
  add Elements, "Appworkspace"
  add Elements, "Desktop"
  add Elements, "Buttontext"
  add Elements, "Captiontext"
  add Elements, "Highlight"
  add Elements, "Highlighttext"
  add Elements, "Inactivewndtitle"
  add Elements, "Inactivewndtitlegradient"
  add Elements, "Inactivewndtitletext"
  add Elements, "Menubackgrnd"
  add Elements, "Menutext"
  add Elements, "Windowbackgrnd"
  add Elements, "Windowtext"
  setColor
end

on setColor
  set the itemDelimiter = ","
  set element = ""
  set OldScheme = [:]
  repeat with i = 1 to count(Elements)
    do "set element="&getAt(Elements,i)
    set r = integer (item 1 of element)
    set g = integer (item 2 of element)
    set b = integer (item 3 of element)
    
    set Ok = setSystemColor (getAt(Elements,i), r, g, b)
    if getAt(Ok, 1) = 0 then
      -- Ok, we save all previous values as the OldScheme property list
      addProp OldScheme, getAt(Elements,i), [getAt(Ok, 3), getAt(Ok, 4), getAt(Ok, 5)]
    else
      -- Error
      alert("Error: " & getAt(Ok, 1) & " - base error code")
    end if
  end repeat
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail