pfc_default


pfcapsrv.pbl   >   pfc_w_pagesetup   >   pfc_default   

Full name pfc_w_pagesetup.pfc_default
Access public
Extend of
Return value
Prototype event pfc_default()

Name Datatype
No Data

Name Datatype
lb_found boolean
li_cnt integer
li_paper integer
li_upper integer
ls_paper string

event pfc_default;call w_response::pfc_default;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  pfc_default
//
//	Description:	 Populate the return values and close the window.
//
//////////////////////////////////////////////////////////////////////////////
//	
//	Revision History
//
//	Version
//	5.0   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.
//
//////////////////////////////////////////////////////////////////////////////

boolean	lb_found
integer	li_paper
integer	li_cnt = 1
integer	li_upper
string		ls_paper

istr_pagesetup.b_actiontaken = true

// Margins
if istr_pagesetup.i_units >=2 then
	istr_pagesetup.i_marginleft = Dec (em_left.text) * 1000
	istr_pagesetup.i_marginright = Dec (em_right.text) * 1000
	istr_pagesetup.i_margintop = Dec (em_top.text) * 1000
	istr_pagesetup.i_marginbottom = Dec (em_bottom.text) * 1000
else
	istr_pagesetup.i_marginleft = Integer (em_left.text)
	istr_pagesetup.i_marginright = Integer (em_right.text)
	istr_pagesetup.i_margintop = Integer (em_top.text)
	istr_pagesetup.i_marginbottom = Integer (em_bottom.text)
end if

// Orientation
if not rb_portrait.checked and not rb_landscape.checked then
	SetNull (istr_pagesetup.b_portraitorientation)
else
	istr_pagesetup.b_portraitorientation = rb_portrait.checked
end if

// Paper Size
ls_paper = ddlb_size.text
li_upper = UpperBound (istr_pagesetup.str_papersize)
do while not lb_found and li_cnt <= li_upper
	if istr_pagesetup.str_papersize[li_cnt].s_type = ls_paper then
		lb_found = true
		li_paper = istr_pagesetup.str_papersize[li_cnt].i_val
	end if
	li_cnt++
loop
if lb_found then
	istr_pagesetup.i_papersize = li_paper
end if

// Paper Source
li_cnt = 1
lb_found = false
ls_paper = ddlb_source.text
li_upper = UpperBound (istr_pagesetup.str_papersource)
do while not lb_found and li_cnt <= li_upper
	if istr_pagesetup.str_papersource[li_cnt].s_type = ls_paper then
		lb_found = true
		li_paper = istr_pagesetup.str_papersource[li_cnt].i_val
	end if
	li_cnt++
loop
if lb_found then
	istr_pagesetup.i_papersource = li_paper
end if

CloseWithReturn (this, istr_pagesetup)
end event

     
Name Owner
pfc_w_pagesetup.cb_ok.clicked cb_ok

     
Name Owner
systemfunctions.closewithreturn systemfunctions
systemfunctions.dec systemfunctions
systemfunctions.integer systemfunctions
systemfunctions.setnull systemfunctions
systemfunctions.upperbound systemfunctions
pfc_w_response.pfc_default pfc_w_response

     
Full name
pfc_w_pagesetup
s_paperattrib
s_pagesetupattrib

     
Name Scope
No Data