Poweredby/fr

From Free Pascal wiki
Revision as of 15:17, 7 March 2017 by E-ric (talk | contribs) (→‎Install)
Jump to navigationJump to search

English (en) français (fr) русский (ru)

Composant TPoweredBy

par minesadorada@charcodelvalle.com

Graphique Windows graphic=

powered by graphic.png

Graphique Linux/MacOS

linux powered by graphic.jpg

Autres logos et bannières


Résumé

  • Un composant visuel (placé dans l'onglet 'Additional') qui s'efface dans l'image graphique au-dessus de la forme après 1 seconde (ou l'affiche pendant 1 seconde dans Linux / MacOS)
  • Plongez dans votre événement Form.create() (Drop into your form.create() event)

Téléchargez

Téléchargez depuis le Lazarus-CCR ici.

Install

  1. Créez un nouveau dossier 'poweredby'
  2. Dézippez l'archive dans le dossier
  3. Dans l'EDI Lazarus ouvrez le paquet poweredby.lpk.
  4. Répondez 'Oui' à la question 'Ouvrir comme un projet ?'
  5. Compilez
  6. Cliquez sur Installer
  7. Répondez 'Oui' à la question 'Voulez-vous compiler Lazarus ?'
  8. Après que Lazarus ait redémarré, contrôlez le nouveau composant 'Poweredby' dans la palette 'Additional'.

Use

  • Start a new project application
  • Drop a 'poweredby' component onto the form
  • Double-click the empty form to show the TForm1.Create method
  • Add poweredby1.showpoweredbyform
  • Run the application

That's it!

Other uses

The PoweredBy component lends itself well to adding as a subcomponent to an existing custom component:

Uses uPoweredBy, Propedits, ..other units

Type
TMyComponent = Class(TComponent)
private 
  fPoweredBy:TPoweredBy;
  ..other stuff
public
  procedure ShowPoweredByLogo; // Call fPoweredBy.ShowPoweredByForm method in this proc.
  ..other stuff
published
  property PoweredBy:TPoweredBy read fPoweredBy write fPoweredBy;
  ..other stuff
end;

procedure Register;
RegisterPropertyEditor(TypeInfo(TPoweredBy),
    TMyComponent, 'PoweredBy', TClassPropertyEditor);

Constructor TMyComponent.Create()
// Use tPoweredBy as a subcomponent
// Register a TClassPropertyEditor in order to display it correctly
  fPoweredBy := TPoweredBy.Create(Self);
  fPoweredBy.SetSubComponent(true);  // Tell the IDE to store the modified properties
  fPoweredBy.Name:='PoweredBy';

License

LGPL license

Platform

Windows

  • PoweredBy will fade-in a shaped graphic

Linux

  • PoweredBy will display a square graphic
    • This is due to the inability of GTK widgetset to deal with transparent shaped screens

Mac OS X

  • PoweredBy displays a square graphic, similar to the Linux version.

Tested

Windows 7 32/64-bit Laz v1.x fpc 2.6.x Linux 32-bit Laz v0.9.x fpc 2.2.x

Version

V1.0.1.2

Support

Email the author with any queries


Voir aussi