Difference between revisions of "Portal:HowTo Demos"

From Free Pascal wiki
Jump to navigationJump to search
(→‎Networking: Added CAPTCHA)
(→‎User Interface: Add Progress in Status Bar; group all Progress Bar examples)
Line 164: Line 164:
  
 
* [https://forum.lazarus.freepascal.org/index.php/topic,45080.msg317949.html#msg317949 Checkbox in a StringGrid]. TStringGrid can show a checkbox instead of text.
 
* [https://forum.lazarus.freepascal.org/index.php/topic,45080.msg317949.html#msg317949 Checkbox in a StringGrid]. TStringGrid can show a checkbox instead of text.
 
* [https://forum.lazarus.freepascal.org/index.php/topic,42610.msg297603.html#msg297603 Color Fade ProgressBar]. Requirement: BGRAControls. How to use TBGRAFlashProgressBar.
 
  
 
* [https://forum.lazarus.freepascal.org/index.php/topic,42107.msg293431.html#msg293431 Darken a Form]. Requirement: BGRAControls. How to darken a form.
 
* [https://forum.lazarus.freepascal.org/index.php/topic,42107.msg293431.html#msg293431 Darken a Form]. Requirement: BGRAControls. How to darken a form.
Line 188: Line 186:
  
 
* [https://forum.lazarus.freepascal.org/index.php/topic,37537.msg252612.html#msg252612 Vertical Menu]. A TVerticalMenu component.  
 
* [https://forum.lazarus.freepascal.org/index.php/topic,37537.msg252612.html#msg252612 Vertical Menu]. A TVerticalMenu component.  
 +
 +
* [https://forum.lazarus.freepascal.org/index.php/topic,42610.msg297603.html#msg297603 Color Fade ProgressBar]. Requirement: BGRAControls. How to use TBGRAFlashProgressBar.
  
 
* [https://forum.lazarus.freepascal.org/index.php/topic,42610.msg297651.html#msg297651 Color Fade ProgressBar]. How to color fade a progress bar without using a third party component.
 
* [https://forum.lazarus.freepascal.org/index.php/topic,42610.msg297651.html#msg297651 Color Fade ProgressBar]. How to color fade a progress bar without using a third party component.
 +
 +
* [https://forum.lazarus.freepascal.org/index.php/topic,44860.0.html Task bar icon progress bar] - Windows only.
 +
 +
* [https://forum.lazarus.freepascal.org/index.php/topic,56367.msg418862.html#msg418862 Progress in Status Bar] - Cross-platform.
  
 
* [https://forum.lazarus.freepascal.org/index.php/topic,37425.msg251457.html#msg251457 ShowMessage in Console Mode]. Requirement: LCL needed to be in the project’s required packages. How to use ShowMessage in a console mode program.
 
* [https://forum.lazarus.freepascal.org/index.php/topic,37425.msg251457.html#msg251457 ShowMessage in Console Mode]. Requirement: LCL needed to be in the project’s required packages. How to use ShowMessage in a console mode program.
Line 210: Line 214:
  
 
* [https://forum.lazarus.freepascal.org/index.php/topic,52725.msg389274.html#msg389274 Runtime forms] How to create a form at runtime.
 
* [https://forum.lazarus.freepascal.org/index.php/topic,52725.msg389274.html#msg389274 Runtime forms] How to create a form at runtime.
 
* [https://forum.lazarus.freepascal.org/index.php/topic,44860.0.html Task bar icon progress bar] Windows only.
 
  
 
* [https://forum.lazarus.freepascal.org/index.php/topic,49251.msg356477.html#msg356477 TAchart example] displaying the time on the X axis.
 
* [https://forum.lazarus.freepascal.org/index.php/topic,49251.msg356477.html#msg356477 TAchart example] displaying the time on the X axis.

Revision as of 12:42, 20 September 2021

English (en)

< Lookup < Portals < Portal:HowTo Demos
Portal:HowTo Demos
HowToLogo.png

This portal collects together in one place a significant number of short demonstration programs that have been posted on the Free Pascal and Lazarus Forums. Each of the demonstration programs generally provides a simple example of one particular development technique.

The Portal was the brainchild of Handoko who also provided the initial list of demonstration programs from the Forums.

Android

  • OpenGL ES2 Circle. Requirement: LAMW. Drawing a circle using jCanvasES2.DrawLine instead of DrawCircle.
  • OpenGL ES2 Rectangle. Requirement: LAMW. Drawing a rectangle using jCanvasES2.DrawPolyFill instead of DrawRect.

File handling

General

  • Generating a huge text file. Demonstrates a technique for reducing program responsiveness to improve performance.
  • Retrieve https web page. Cross-platform. No openssl DLLs/libraries need to be deployed. No third party components required.

Graphics

  • Get pixel color of an image. It may sound easy but actually it is not so easy.
  • Fading images using BGRABitmap. Requirement: BGRABitmap. Build your own slideshow and learn doing proportional scaling using aspect ratio of the picture.
  • TCanvas Text. How to draw superscript and subscript text using TCanvas.
  • Rock, Paper, Scissors. A simple game. Note for Unix/like operating systems: change the path delimiter to make the code work.

Networking

  • FTP Connect. Requirement: Synapse (can be installed using OPM). How to connect to a FTP server.
  • HTML to Text. Requirement: fasthtmlparser. Extract data from a web page.
  • Retrieve https web page. Cross-platform. No openssl DLLs/libraries need to be deployed. No third party components required.
  • Simple webserver. Multi-threaded, cross-platform. No third party components required.
  • Upload file - How to send a file to a web server using TFPHTTPClient.

User Interface

  • Searchable StringGrid. Requirement: DBFLaz. Load data from a dbf, show it on a TStringGrid, search and highlight the cells. See here and here.
  • Darkening a Form. Requirement: BGRAControls. How to darken the Main Form when a modal window is shown.
  • Scaling a Form. How to scale a form by using TForm.ScaleBy. Unfortunately it does not work correctly on Linux.
  • Vertical Menu. How to make a vertical menu using TPanel and TScrollBox.
  • ShowMessage in Console Mode. Requirement: LCL needed to be in the project’s required packages. How to use ShowMessage in a console mode program.
  • Adding CHM Help. A demo project to call a CHM help file from three buttons as context-sensitive help (press F1), or from a help menu.
  • Speedbutton demonstration of using four arrow speedbuttons for moving an object. Shows how to handle speedbutton glyph states.