Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 11 to 12 of 12 total |
Buttons not firing as expected ! |
Fri, Dec 22 2017 8:35 PM | Permanent Link |
Raul Team Elevate | On 12/21/2017 12:37 PM, kamran wrote:
> URLList.Add(PrintBrowser.URL:='1xxxxxxxxxxxxxxxxxxxxxxxx'); > URLList.Add(PrintBrowser.URL:='2xxxxxxxxxxxxxxxxxxxxxxxx'); > URLList.Add(PrintBrowser.URL:='3xxxxxxxxxxxxxxxxxxxxxxxx'); This does not look right with assignment - did you mean to concatenate the URL and string you provided ? (URLList.Add(PrintBrowser.URL + '3xxxxxxxxxxxxxxxxxxxxxxxx') however here is a very quick unit of what i meant. Form itself just has TBrowser and Button. Form has OnCreate and OnDestroy event handlers and TBRowser has OnCall event handler. You could just add URLs but calling public LoadURL function and providing URL as parameter ======================================= unit frmMain; interface uses WebCore, WebUI, WebForms, WebCtrls, WebBtns, WebBrwsr, WebEdits; type TForm1 = class(TForm) Button1: TButton; Browser1: TBrowser; MultiLineEdit1: TMultiLineEdit; procedure Form1Create(Sender: TObject); procedure Form1Destroy(Sender: TObject); procedure Browser1Load(Sender: TObject); private URLList:TStringList; bBrowserLoading:boolean; public procedure LoadURL(const URLToLoad:string); end; var Form1: TForm1; implementation procedure TForm1.Form1Create(Sender: TObject); begin URLList := TStringList.Create; bBrowserLoading := false; end; procedure TForm1.Form1Destroy(Sender: TObject); begin URLList.Free; end; procedure TForm1.LoadURL(const URLToLoad:string); begin if bBrowserLoading then URLList.Add(URLToLoad) else begin bBrowserLoading := true; Browser1.URL := URLToLoad; end; end; procedure TForm1.Browser1Load(Sender: TObject); begin if URLList.Count > 0 then begin Browser1.URL := URLList[0]; URLList.Delete(0); end else bBrowserLoading := false; end; end. |
Sat, Dec 23 2017 6:53 AM | Permanent Link |
kamran | Hi Raul
I will try this . Really appreciate your help. Merry Christmas !" Cheers Kamran Raul wrote: On 12/21/2017 12:37 PM, kamran wrote: > URLList.Add(PrintBrowser.URL:='1xxxxxxxxxxxxxxxxxxxxxxxx'); > URLList.Add(PrintBrowser.URL:='2xxxxxxxxxxxxxxxxxxxxxxxx'); > URLList.Add(PrintBrowser.URL:='3xxxxxxxxxxxxxxxxxxxxxxxx'); This does not look right with assignment - did you mean to concatenate the URL and string you provided ? (URLList.Add(PrintBrowser.URL + '3xxxxxxxxxxxxxxxxxxxxxxxx') however here is a very quick unit of what i meant. Form itself just has TBrowser and Button. Form has OnCreate and OnDestroy event handlers and TBRowser has OnCall event handler. You could just add URLs but calling public LoadURL function and providing URL as parameter ======================================= unit frmMain; interface uses WebCore, WebUI, WebForms, WebCtrls, WebBtns, WebBrwsr, WebEdits; type TForm1 = class(TForm) Button1: TButton; Browser1: TBrowser; MultiLineEdit1: TMultiLineEdit; procedure Form1Create(Sender: TObject); procedure Form1Destroy(Sender: TObject); procedure Browser1Load(Sender: TObject); private URLList:TStringList; bBrowserLoading:boolean; public procedure LoadURL(const URLToLoad:string); end; var Form1: TForm1; implementation procedure TForm1.Form1Create(Sender: TObject); begin URLList := TStringList.Create; bBrowserLoading := false; end; procedure TForm1.Form1Destroy(Sender: TObject); begin URLList.Free; end; procedure TForm1.LoadURL(const URLToLoad:string); begin if bBrowserLoading then URLList.Add(URLToLoad) else begin bBrowserLoading := true; Browser1.URL := URLToLoad; end; end; procedure TForm1.Browser1Load(Sender: TObject); begin if URLList.Count > 0 then begin Browser1.URL := URLList[0]; URLList.Delete(0); end else bBrowserLoading := false; end; end. |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Monday, October 14, 2024 at 05:15 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |