| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
The class of the progress-indicator control.
An instance of the progress-indicator class. This control often appears where users make a request on a form and will have to wait for some hidden process to complete before proceeding with the rest of the possible functions on the form.
Click the progress-indicator tool on the Component toolbar. Move the mouse cursor to the part of the form where you want to place the control, and click again. The control will appear with colored resizing handles.
Controls can only be resized and moved on forms during the design stage; the size and location of everything is fixed on a running form.
Resize the control by clicking the mouse cursor and dragging one of the handles to the new size-point. Release the mouse key when you are satisfied with the new size.
Move the control by clicking anywhere on it except a resizing handle and dragging it to a new location on the form. Release the mouse key when you are ready to place the control.
If the caption is small enough to see in the Inspector's right column, you can also click once on the title and delete and replace the text right in the Inspector without opening the Edit Expression dialog.
See About how to get sample code for creating controls in cgide.htm, which explains how to use the IDE to create such code.
The following code creates a dialog window with a progress indicator
on it. The variable my-pi
is set to the component,
using find-component. The
function foo runs through a loop of length 10, printing the
fraction done and updating the progress indicator in each iteration,
while also sleeping for one second between loop interations. The
progress indicator is incremented with (setf value).
(in-package :cg-user) (make-window :pi-dialog :class 'dialog :interior (make-box-relative 100 100 240 140) :dialog-items (list (make-instance 'progress-indicator :left 20 :top 20 :width 200 :height 20 :name :my-pi :value 0 :range '(0 100) ))) (defvar my-pi) (setq my-pi (find-component :my-pi :pi-dialog)) (defun foo () (declare (special my-pi)) (setf (value my-pi) 0) (dotimes (i 10) (sleep 1) (format t "~D% done~%" (* 10 (+ i 1))) (setf (value my-pi) (* 10 (+ i 1))) ))
A diagram of window and widget classes is shown in Widget and window classes in cgide.htm.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |