Poweredby: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | - | ||
| 2 | 1 | ==TPoweredBy component== | |
| 3 | 2 | ||
| 4 | 3 | ### by minesadorada@charcodelvalle.com | |
| 5 | 4 | ||
| 6 | 5 | #### Windows graphic | |
| 7 | 6 | ||
| 8 | - | ||
| 9 | - | ||
| 10 | - | ||
| 11 | - | ||
| 7 | + |  | |
| 12 | 8 | ||
| 13 | 9 | ##### Linux/macOS graphic | |
| 14 | 10 | ||
| 15 | - | ||
| 16 | - | ||
| 17 | - | ||
| 18 | - | ||
| 11 | + |  | |
| 19 | 12 | ||
| 20 | 13 | ### Other logos and banners | |
| 21 | 14 | ||
| 22 | 15 | - [[Logos and Banners]] | |
| 23 | 16 | ||
| 24 | 17 | ------------------------------------------------------------------------ | |
| 25 | 18 | ||
| 26 | 19 | ### Summary | |
| 27 | 20 | ||
| 28 | 21 | - A visual component (installed on the 'Additional' tab) that fades in above shaped graphic image for 1 second (or in Linux/MacOS displays it for 1 second) | |
| 29 | 22 | - Drop into your form.create() event | |
| 30 | 23 | ||
| 31 | 24 | ### Download | |
| 32 | 25 | ||
| 33 | 26 | Download from the lazarus CCR [here](https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/) | |
| 34 | 27 | ||
| 35 | 28 | ### Install | |
| 36 | 29 | ||
| 37 | 30 | 1. Make a new folder 'poweredby' | |
| 38 | 31 | 2. Unzip the archive into the folder | |
| 39 | 32 | 3. In the Lazarus IDE choose 'Open' poweredby.lpk | |
| 40 | 33 | 4. When asked 'Open as a project' answer 'yes' | |
| 41 | 34 | 5. Click Compile | |
| 42 | 35 | 6. Click Use/Install | |
| 43 | 36 | 7. When asked 'would you like to compile Lazarus?'m answer 'yes' | |
| 44 | 37 | 8. After Lazarus has restarted, check the 'Additional' component tab/palette for the new 'poweredby' component | |
| 45 | 38 | ||
| 46 | 39 | ### Use | |
| 47 | 40 | ||
| 48 | 41 | - Start a new project application | |
| 49 | 42 | - Drop a 'poweredby' component onto the form | |
| 50 | 43 | - Double-click the empty form to show the TForm1.Create method | |
| 51 | 44 | - Add poweredby1.showpoweredbyform | |
| 52 | 45 | - Run the application | |
| 53 | 46 | ||
| 54 | 47 | That's it! | |
| 55 | 48 | ||
| 56 | 49 | #### Other uses | |
| 57 | 50 | ||
| 58 | 51 | The PoweredBy component lends itself well to adding as a subcomponent to an existing custom component: | |
| 59 | 52 | ||
| 60 | 53 | ``` pascal | |
| 61 | 54 | Uses uPoweredBy, Propedits, ..other units | |
| 62 | 55 | ||
| 63 | 56 | Type | |
| 64 | 57 | TMyComponent = Class(TComponent) | |
| 65 | 58 | private | |
| 66 | 59 | fPoweredBy:TPoweredBy; | |
| 67 | 60 | ..other stuff | |
| 68 | 61 | public | |
| 69 | 62 | procedure ShowPoweredByLogo; // Call fPoweredBy.ShowPoweredByForm method in this proc. | |
| 70 | 63 | ..other stuff | |
| 71 | 64 | published | |
| 72 | 65 | property PoweredBy:TPoweredBy read fPoweredBy write fPoweredBy; | |
| 73 | 66 | ..other stuff | |
| 74 | 67 | end; | |
| 75 | 68 | ||
| 76 | 69 | procedure Register; | |
| 77 | 70 | RegisterPropertyEditor(TypeInfo(TPoweredBy), | |
| 78 | 71 | TMyComponent, 'PoweredBy', TClassPropertyEditor); | |
| 79 | 72 | ||
| 80 | 73 | Constructor TMyComponent.Create() | |
| 81 | 74 | // Use tPoweredBy as a subcomponent | |
| 82 | 75 | // Register a TClassPropertyEditor in order to display it correctly | |
| 83 | 76 | fPoweredBy := TPoweredBy.Create(Self); | |
| 84 | 77 | fPoweredBy.SetSubComponent(true); // Tell the IDE to store the modified properties | |
| 85 | 78 | fPoweredBy.Name:='PoweredBy'; | |
| 86 | 79 | ``` | |
| 87 | 80 | ||
| 88 | 81 | ### License | |
| 89 | 82 | ||
| 90 | 83 | LGPL license | |
| 91 | 84 | ||
| 92 | 85 | ### Platform | |
| 93 | 86 | ||
| 94 | 87 | #### Windows | |
| 95 | 88 | ||
| 96 | 89 | - PoweredBy will fade-in a shaped graphic | |
| 97 | 90 | ||
| 98 | 91 | #### Linux | |
| 99 | 92 | ||
| 100 | 93 | - PoweredBy will display a square graphic | |
| 101 | 94 | - This is due to the inability of GTK widgetset to deal with transparent shaped screens | |
| 102 | 95 | ||
| 103 | 96 | #### macOS | |
| 104 | 97 | ||
| 105 | 98 | - PoweredBy displays a square graphic, similar to the Linux version. | |
| 106 | 99 | ||
| 107 | 100 | ### Tested | |
| 108 | 101 | ||
| 109 | 102 | Windows 7 32/64-bit Laz v1.x fpc 2.6.x Linux 32-bit Laz v0.9.x fpc 2.2.x | |
| 110 | 103 | ||
| 111 | 104 | ### Version | |
| 112 | 105 | ||
| 113 | 106 | V1.0.1.2 | |
| 114 | 107 | ||
| 115 | 108 | #### Support | |
| 116 | 109 | ||
| 117 | 110 | [Email the author](mailto:minesadorada@charcodelvalle.com) with any queries | |
| 118 | 111 | ||
| 119 | 112 | ### See Also | |
| 120 | 113 | ||
| 121 | 114 | - [[Logos and Banners]] | |
| 122 | 115 | - [[ScrollText|Standalone Scrolling Text component]] | |
| 123 | 116 | - [[Components and Code examples|Components and code examples]] | |
| 124 | 117 | ||
| 125 | 118 | --- | |
| 126 | 119 | *From the Free Pascal wiki, page "Poweredby", as it stood on 2020-02-23 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
