Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Removing the stage border
Import from Access - Valentina
Tint bitmap behaviour
Tri-State Button
Automatic update of folders with FTP - a free example
Custom Alert
cXtraSoundRec
Get CD ROM Drive letter
merge sorting including accent marked strings
Quiz engine
 

 

 

Behavior Print Dialog Behavior

Added on 2/24/2003

 

Compatibilities:
behavior D6_5 D7 D8 D8_5 D9 PC US

Required Xtras:
HandyDialog Xtra

This item has not yet been rated

Author: Shockdev

Generic behavior to display Print Dialog.

-- Print Dialog Behavior
-- HandyDialog Xtra 1.0 or later is required
-- by Meliora Software www.meliorasoft.com/xtras/
-- Compatibilities: Director 6.0 or higher Windows

property PrintRange, From, To, Min, Max, EnablePages, EnableSelection, InitCollate, ShowPrintToFile, EnablePrintToFile, InitPrintToFile, InitnCopies

on getPropertyDescriptionList
  set description = [:]
  addProp description, #PrintRange, [#default:"", #format:#string, #comment:"Print Range (All,Pages,Selection):"]
  addProp description, #From, [#default:0, #format:#integer, #comment:"Print from page:"]
  addProp description, #To, [#default:0, #format:#integer, #comment:"Print to page:"]
  addProp description, #Min, [#default:0, #format:#integer, #comment:"Page Range Min value:"]
  addProp description, #Max, [#default:0, #format:#integer, #comment:"Page Range Max value:"]
  addProp description, #EnablePages, [#default:false, #format:#boolean, #comment:"Enable Pages radio button:"]
  addProp description, #EnableSelection, [#default:false, #format:#boolean, #comment:"Enable Selection radio button:"]
  addProp description, #InitCollate, [#default:false, #format:#boolean, #comment:"Collate checkbox is checked by default:"]
  addProp description, #ShowPrintToFile, [#default:false, #format:#boolean, #comment:"Show 'Print To File' checkbox:"]
  addProp description, #EnablePrintToFile, [#default:false, #format:#boolean, #comment:"Enable to check 'Print To File' checkbox:"]
  addProp description, #InitPrintToFile, [#default:false, #format:#boolean, #comment:"Print To File is checked by default:"]
  addProp description, #InitnCopies, [#default:1, #format:#integer, #comment:"Number of Copies:"]
  return description
end

on mouseDown
  printDialog
end

on printDialog
  -- Font Dialog Init Settings
  set InitSettings = [:]
  addProp InitSettings, #PrintRange, PrintRange
  addProp InitSettings, #Pages, [#From:From, #To:To, #Min:Min, #Max:Max]
  addProp InitSettings, #EnablePages, EnablePages
  addProp InitSettings, #EnableSelection, EnableSelection
  addProp InitSettings, #InitCollate, InitCollate
  addProp InitSettings, #ShowPrintToFile, ShowPrintToFile
  addProp InitSettings, #EnablePrintToFile, EnablePrintToFile
  addProp InitSettings, #InitPrintToFile, InitPrintToFile
  addProp InitSettings, #InitnCopies, InitnCopies

  set Ok = showPrintDialog(InitSettings)
  
  if getAt(Ok,1) = 0 then
    if count(Ok) = 3 then
      -- Print button clicked
      put getAt(Ok,3)
    else
      --  Cancel button was clicked
      put "Cancel button was clicked"
    end if
  else
    -- Error occured
    alert("Error: " & getAt(Ok, 1) & " - base error code")
  end if
  
end

on getBehaviorDescription
  return "- -   Print Dialog Behavior   - -"
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail