>> Rodney Roberts IS & Education Professional Homepage >> Programming Tutorials And Downloads >> Model Rockets & Boost/Gliders Programming
![]()
Science makes it known,
|
Using Lazarus Tab Sheets (TPageControl & TTabSheet)
Adding TPageControl & TTabSheet to a Form To place a TPageControl on a TForm, select the Common Controls tab on the Lazarus IDE tool bar, click on the circled icon shown below, ![]()
(do not add event procedures prior to copying) These can then be copied to successive TTabSheets. ![]() Copying TControls from one TTabSheet and Pasting to another TTabSheet First, using Object Inspector, select the desired TControls (while holding down the Ctrl key, left click on the TControl) from the source TTabSheet (do not include the TTabSheet). Right click and select Copy. ![]() Next, left click on the tab of the empty TTabSheet TControl just added. Right click in the TTabSheet TControl on the Form. Select Paste. (Hint: you may want to change the pasted TControls names from the default Lazarus assigned unique name) ![]() Finally, make any Name, Hint, etc., corrections to the pasted TControls, add event procedures, etc. ![]() 1. Barrowman, James. TIR-33 Calculating the Center of Pressure Image from p. 20, Figure 12 and then modified 2. TMissle10 is the form class used in this unit, Missle11.pas. Missle11/Missle10 is designed to be executed as either a stand-alone main form or as a sub-form of a multiform application. For example, when executed as a main form, File, Exit is used to exit the application. When executed as a sub-form, File, Close Form is used to close the form - File, Exit is disabled; there are other processing differences as well. Accomplished with public variable Missle10.frmType and interface section constants MainForm, SubForm. In the *.lpr file (Project Main Source), use the statements: Application.CreateForm(TMissle10, Missle10); Missle10.frmType:=MainForm; - OR - Application.CreateForm(TMissle10, Missle10); Missle10.frmType:=Missle11.SubForm; Use the former to execute as a main form, the latter to execute as a sub-form; to activate as a sub-form use ModalResult:=Missle10.ShowModal( ); in higher level form. File, Close Form sets ModalResult:=mrClose; Missle11/Missle10 calls procedures in missle02.dll (which calls subprograms in mathproc.dll) and nrlazrs.dll (which calls subprograms in sttstcs.dll and mathproc.dll; instead of Lazarus program directly calling a FORTRAN subprogram, recommend calling FORTRAN .dll subprograms via an Object Pascal .dll; do not recommend calling D procedures from Lazarus directly or indirectly). After this project was nearly completed, it occurred to me how to possibly further streamline each stage's Conical Transition TStringGrid events' processing - part of being a professional, learning to criticize one's work. 3. Thanks to LAZ PLANET for some of the material. |
Any and all © copyrights, ™ ® trademarks, or other
intellectual property (IP) mentioned here are the property of their
respective owners. No infringment is intended.
Feel free to use any of the above in your project (without violating any intellectual property rights); please give credit (same idea as Copyleft). Page best viewed with Mozilla FireFox 3.6.13 (or higher; recommended), Chrome, and Safari 5.1.7; some versions of Internet Explorer may not display properly. Avoid Smart Applications Speed Browser. |
Web hosting provided by | ||||||
![]() |
, |
![]() |
, |
![]() |
, & |
![]() |
>> Rodney Roberts IS & Education Professional Homepage >> Programming Tutorials And Downloads >> Model Rockets & Boost/Gliders Programming