|
of_updatevisuals
|
|
Full name
|
pfc_u_progressbar.of_updatevisuals
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_updatevisuals(decimal)
|
Name
|
Datatype
|
ll_height
|
long
|
ll_index
|
long
|
ll_width
|
long
|
protected function integer of_updatevisuals (decimal adc_completion);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_UpdateVisuals
//
// Access: protected
//
// Arguments: decimal
// adc_completion the completion value of the progress bar
//
// Returns: integer
// SUCCESS = 1
// ERROR = -1
//
// Description:
// Resizes the progressbar to the completion size and sets the display text
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.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.
//
//////////////////////////////////////////////////////////////////////////////
long ll_index, ll_width, ll_height
if isnull(adc_completion) or (adc_completion < 0) then
return -1
end if
ll_width = this.width
ll_height = this.height
CHOOSE Case ii_fillstyle
Case RIGHTLEFT
// horizontal movement from right to left
dw_progress.object.progress_rect.x = ll_width - integer(adc_completion * ll_width)
dw_progress.object.progress_rect.width = integer(adc_completion * ll_width)
Case LEFTRIGHT
// horizontal movement from left to right
dw_progress.object.progress_rect.width = integer(adc_completion * ll_width)
Case TOPDOWN
// vertical movement from top to bottom
dw_progress.object.progress_rect.height = integer(adc_completion * ll_height)
Case BOTTOMUP
// vertical movement from bottom to top
dw_progress.object.progress_rect.y = ll_height - integer(adc_completion * ll_height)
dw_progress.object.progress_rect.height = integer(adc_completion * ll_height)
END CHOOSE
// Set percentages on screen
CHOOSE CASE ii_displaystyle
CASE BAR
dw_progress.object.pct.visible = 0
dw_progress.object.pct[1] = ""
CASE PCTCOMPLETE
dw_progress.object.pct[1] = string(adc_completion, "#%")
CASE POSITION
dw_progress.object.pct[1] = string(ii_position, "#")
CASE MSGTEXT
if ii_msgtextcount > 0 then
for ll_index = 1 to ii_msgtextcount
if (adc_completion <= (ll_index / ii_msgtextcount)) then
dw_progress.object.pct[1] = is_msgtext[ll_index]
exit
end if
end for
else
dw_progress.object.pct[1] = "??"
end if
CASE ELSE
dw_progress.object.pct.visible = 0
END CHOOSE
return 1
end function
Name
|
Owner
|
systemfunctions.integer |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.string |
systemfunctions
|