trey
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by trey
-
-
Put on form
UniPanel1: TUniPanel;
UniButton1: TUniButton;
UniProgressBar1: TUniProgressBar;
UniLabel1: TUniLabel;
Run on WebBrowser
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses, uniGUIClasses, uniGUIForm, uniLabel, uniProgressBar, uniButton, uniGUIBaseClasses, uniPanel; type TMainForm = class(TUniForm) UniPanel1: TUniPanel; UniButton1: TUniButton; UniProgressBar1: TUniProgressBar; UniLabel1: TUniLabel; procedure UniFormCreate(Sender: TObject); procedure UniButton1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; function MainForm: TMainForm; implementation {$R *.dfm} uses uniGUIVars, MainModule, ServerModule, uniGUIServer; function MainForm: TMainForm; begin Result := TMainForm(UniMainModule.GetFormInstance(TMainForm)); end; procedure TMainForm.UniButton1Click(Sender: TObject); var i:integer; begin UniProgressBar1.Max:=100; UniPanel1.Visible:=true; // 1. why does not work? for i:=0 to 100 do begin sleep(10); UniLabel1.Text:=inttostr(i); // 2. why does not work? UniProgressBar1.Position:=i; // 3. why does not work? Application.ProcessMessages; // 4. why does not work? UniProgressBar1.Refresh; // 5. why does not work? UniProgressBar1.RePaint; // 6. why does not work? end; UniPanel1.Visible:=false; end; procedure TMainForm.UniFormCreate(Sender: TObject); begin UniServerModule.MainFormDisplayMode:=mfPage; UniPanel1.Visible:=false; end; initialization RegisterMainFormClass(TMainForm); end.
I even tried to run the UniProgressBar1.Position in a new threads , but webform is dead when the cycle runs.
Why does not work this simple code?
in General
Posted
Thanks for the link. but!
Why should I write "bikes"?
why asynchronous operation can not be achieved by the component itself?
why methods Repaint, Refresh, in components when it does not work ?