Menu

ImageView tag property

luca
2014-01-24
2014-06-05
  • luca

    luca - 2014-01-24

    Is possible add TAG property to ImageView to save some information (as for button in the sample).
    How I can loop on all ImageView present on a DPFJScrollView?
    At run time is possible search for a component (by name or by id) as for controls on a form win32 application?

    thanks

     

    Last edit: luca 2014-01-24
  • Steve

    Steve - 2014-06-05

    You can base your own class on the imageview and add the property yourself. Create a new unit similar to this and add it to your project:

    unit Unit3;

    interface

    uses
    System.Classes, DPF.iOS.UIImageView;

    type
    TmyDPFImageView =class(TDPFImageView)
    private
    ftag: integer;
    public
    constructor Create(AOwner: TComponent); override;
    //destructor Destroy; override;
    Property tag: integer read ftag write ftag;
    end;

    implementation

    end.

    Add this unit to the interface uses clause of your form and then change your TDPFImageView components to be TmyDPFImageView.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.