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