open


pfcapsrv.pbl   >   pfc_w_print   >   open   

Full name pfc_w_print.open
Access public
Extend of
Return value
Prototype event open()

Name Datatype
No Data

Name Datatype
ls_frompage string

event open;call super::open;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  open
//
//	Description:  Initialize window from passed in printdlg structure
//
//////////////////////////////////////////////////////////////////////////////
//	
//	Revision History
//
//	Version
//	5.0.02   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

string	ls_frompage

ib_disableclosequery = true

istr_printdlg = message.powerobjectparm

// Check appropriate page range selection
rb_all.checked = istr_printdlg.b_allpages
rb_pages.checked = istr_printdlg.b_pagenums
rb_selection.checked = istr_printdlg.b_selection

// Disable page numbers option if requested
if istr_printdlg.b_disablepagenums then
	rb_pages.enabled = false
	em_frompage.enabled = false
	em_topage.enabled = false
end if

// Disable page selection if requested
rb_selection.enabled = not istr_printdlg.b_disableselection

// Collate
cbx_collate.checked = istr_printdlg.b_collate
if cbx_collate.checked then
	p_collate.picturename = "collat.bmp"
end if

// Copies
if istr_printdlg.l_copies < 1 then
	istr_printdlg.l_copies = 1
end if
em_copies.text = String (istr_printdlg.l_copies)

// Print to file
cbx_printtofile.checked = istr_printdlg.b_printtofile
cbx_printtofile.enabled = not istr_printdlg.b_disableprinttofile
cbx_printtofile.visible = not istr_printdlg.b_hideprinttofile

// Page range
ls_frompage = String (istr_printdlg.l_frompage)
em_frompage.text = ls_frompage
em_topage.text = String (istr_printdlg.l_topage)

// Calculate min and max page
il_minpage = istr_printdlg.l_minpage
if il_minpage < 1 then
	il_minpage = 1
end if
il_maxpage = istr_printdlg.l_maxpage
if il_maxpage > 65535 then
	il_maxpage = 65535
end if

if rb_pages.enabled then
	em_frompage.text = ls_frompage
end if

// Use the b_disablepagenums element to determine whether an action was taken
// for the dialog
SetNull (istr_printdlg.b_disablepagenums)
end event

     
Name Owner
No Data

     
Name Owner
systemfunctions.setnull systemfunctions
systemfunctions.string systemfunctions
pfc_w_master.open pfc_w_master

     
Full name
pfc_w_print
s_printdlgattrib
pfc_w_print.rb_all
pfc_w_print.em_frompage
pfc_w_print.rb_selection
pfc_w_print.p_collate
pfc_w_print.em_copies
demopfc

     
Name Scope
No Data