of_barupdatevisuals


pfcwnsrv.pbl   >   pfc_n_cst_winsrv_statusbar   >   of_barupdatevisuals   

Full name pfc_n_cst_winsrv_statusbar.of_barupdatevisuals
Access protected
Extend of string
Return value string
Prototype protected function string of_barupdatevisuals(decimal)

Name Datatype
No Data

Name Datatype
li_newheight integer
li_newwidth integer
li_newx integer
li_newy integer
ls_barstyle string
ls_fillstyle string

protected function string of_barupdatevisuals (decimal adc_completion);//////////////////////////////////////////////////////////////////////////////
//
//	Function:	of_BarUpdateVisuals
//
//	Access:		protected
//
//	Arguments:	decimal
//	adc_completion	the completion value of the progress bar
//
//	Returns:		String
//	SUCCESS = modify string to use to set the progress bar visuals
//	ERROR = ""
//
//	Description:
//	 Create a string to size the progressbar to the completion size and set the display text
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1999 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_fillstyle, ls_barstyle
integer	li_newwidth, li_newheight, li_newx, li_newy

if isnull(adc_completion) or (adc_completion < 0) then
	return ""
end if

CHOOSE Case ii_barfillstyle
	Case RIGHTLEFT
		// horizontal movement from right to left
		li_newwidth = integer(adc_completion * ii_barwidth)
		ls_fillstyle = 'pfc_progress.width="' + string(li_newwidth) + '" '
		li_newx = ii_barstartx + ii_barwidth - li_newwidth
		ls_fillstyle = ls_fillstyle + 'pfc_progress.x="' + string(li_newx) + '" '
	Case LEFTRIGHT
		// horizontal movement from left to right
		li_newwidth = integer(adc_completion * ii_barwidth)
		ls_fillstyle = 'pfc_progress.width="' + string(li_newwidth) + '" '
	Case TOPDOWN
		// vertical movement from top to bottom
		li_newheight = integer(adc_completion * ii_barheight)
		ls_fillstyle = 'pfc_progress.width="' + string(ii_barwidth) + '" '
		ls_fillstyle = ls_fillstyle + 'pfc_progress.height="' + string(li_newheight) + '" '
	Case BOTTOMUP
		// vertical movement from bottom to top
		li_newheight = integer(adc_completion * ii_barheight)
		li_newy = ii_barheight - li_newheight + ii_barstarty
		ls_fillstyle = 'pfc_progress.width="' + string(ii_barwidth) + '" '
		ls_fillstyle = ls_fillstyle + 'pfc_progress.height="' + string(li_newheight) + '" '
		ls_fillstyle = ls_fillstyle + 'pfc_progress.y="' + string(li_newy) + '" '
END CHOOSE

// Set percentages on screen
CHOOSE CASE ii_bardisplaystyle
	CASE BAR
		ls_barstyle = "pfc_progress_border.expression=~"' '~" "
	CASE PCTCOMPLETE
		ls_barstyle = "pfc_progress_border.expression=~"'" + string(adc_completion, "#%") + "'~" "
	CASE POSITION
		ls_barstyle = "pfc_progress_border.expression=~"'" + string(ii_barposition, "#") + "'~" "
END CHOOSE

return (ls_fillstyle + ls_barstyle)
end function

     
Name Owner
pfc_n_cst_winsrv_statusbar.of_setbarposition pfc_n_cst_winsrv_statusbar

     
Name Owner
systemfunctions.integer systemfunctions
systemfunctions.isnull systemfunctions
systemfunctions.string systemfunctions
systemfunctions.string systemfunctions

     
Full name
No Data

     
Name Scope
No Data