Difference between revisions of "Printer.setPageTitle"

From ComputerCraft Wiki
Jump to: navigation, search
m (-> printer api)
m (Expanded)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
{{Function
 
{{Function
|name=printer.setPageTitle
+
|name=''printer''.setPageTitle
|args=[[string (type)|string]] title
+
|args={{type|string}} title
|returns=none
+
|returns={{type|nil}}
 
|api=printer
 
|api=printer
 
|addon=ComputerCraft
 
|addon=ComputerCraft
|desc=Sets the title of the page being printed
+
|desc=Sets the title of the page. This title is seen when you hover your mouse over the page in the inventory.
 
|examples=
 
|examples=
 
{{Example
 
{{Example
 
|desc=Set the title of a page to be printed.
 
|desc=Set the title of a page to be printed.
|code=Printer.setPageTitle("Test page")
+
|code= local printer = [[peripheral.wrap]]("left")
|output=When the page is hovered-on in the inventory, the tooltip reads "Printed Page; Test page"
+
 +
[[printer.newPage]]()
 +
printer.setPageTitle("My page title")
 +
[[printer.endPage]]()
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:Lua_Core_Functions]]
 
[[Category:Lua_Core_Functions]]

Latest revision as of 18:12, 9 April 2014


Grid Redstone.png  Function printer.setPageTitle
Sets the title of the page. This title is seen when you hover your mouse over the page in the inventory.
Syntax printer.setPageTitle(string title)
Returns nil
Part of ComputerCraft
API printer

Examples

Grid paper.png  Example
Set the title of a page to be printed.
Code
local printer = peripheral.wrap("left")

printer.newPage()
printer.setPageTitle("My page title")
printer.endPage()