Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4125654
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:53:53+00:00 2026-05-20T23:53:53+00:00

Aplogies for top posting. This has buggged me for years and now I really

  • 0

Aplogies for top posting. This has buggged me for years and now I really need to know the answer. I put 150 points bounty to attract interest, but could increase for the right answer.

Here is what I need:

I use the TMS obejct inpsctor from TMS Scripter Pro to allow users to design a form at run-time. You can assume that it derives from the standard Delphi Object Inspector and adds a little functionality but 90% of it just calls inherited methods.

When I click the ellipsis next to the Picture property of a TImage it calls an inherited method – I don’t know which – to allow me to load a picture. When I have done so, I do not know which file the image was loaded from and I want to save it with the same name in a different directory.

  • I could prompt the user for a file name, but that looks confusing to him and is just plain sloppy.
  • I could find a TImage / TPicture descendant which stores the file name and allows me to query it. Anyone who can point out such a FOSS component gets the bounty.
  • I could derive from TPicture and or TImage and code it myself, but am not certain what to change. Anyone who can tell me exactly how to code it gets the the bounty. By exactly, I mean naming classes and methods.

Thanks in advance for any help. This one really annoys me.


Further to my previous question, which did not get a useful answer despite a bounty, I will try rephrasing the question.

Basically, when the user clicks the ellipsis in the object inspector, Delphi opens a file/open dialog. I want to replace this handling with my own, so that I can save the image’s path.

I would have expected that all I need to do is to derive a class from TImage and override the Assign() function, as in the following code. However, when I do the assign function is never called. So, it looks like I need to override something else, but what?

unit my_Image;


interface

uses
  Classes, ExtCtrls, Jpeg, Graphics;

type
  Tmy_Image = class(Timage)
    private
      FPicture : TPicture;

    protected
      procedure OnChange(Sender: TObject);

    public { Public declarations }
      Constructor Create(AOwner: TComponent); override;  
      procedure   SetPicture(picture : TPicture); 
      procedure   Assign(Source: TPersistent); override;

    published  { Published declarations - available in the Object Inspector at design-time }
      property Picture : TPicture read FPicture write SetPicture;
  end;  // of class Tmy_Image()

  procedure Register;

implementation

uses Controls, Dialogs;

  procedure Register;
  begin
    RegisterComponents('Standard', [Tmy_Image]);
  end;

  Constructor Tmy_Image.Create(AOwner: TComponent);
  begin
    inherited;  // Call the parent Create method
    Hint := 'Add an image from a file|Add an image from a file'; // Tooltip | status bar text
    AutoSize := True;  // Control resizes when contents change (new image is loaded)
    Height := 104;
    Width  := 104;
    FPicture := TPicture.Create();
    self.Picture.Bitmap.LoadFromResourceName(hInstance, 'picture_poperty_bmp');
  end;

  procedure Tmy_Image.OnChange(Sender: TObject);
  begin
    Constraints.MaxHeight := Picture.Height;
    Constraints.MaxWidth  := Picture.Width;
    Self.Height := Picture.Height;
    Self.Width  := Picture.Width;
  end;

  procedure   Tmy_Image.SetPicture(picture : TPicture);
  begin
    MessageDlg('Tmy_Image.SetPicture', mtWarning, [mbOK], 0);   // never called
  end;


  procedure Tmy_Image.Assign(Source: TPersistent);
  begin
    MessageDlg('Tmy_Image.Assign', mtWarning, [mbOK], 0);   // never called
  end;

end.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:53:54+00:00Added an answer on May 20, 2026 at 11:53 pm

    Ok, I hacked the TMS code. It seemed to be the only way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a div at the top of a page that I would like
I'm writing a small Bittorrent tracker on top of the Django framework, as part
I have a PHP script vieworder.php that includes other scripts at the top. <?php
As the title says, I'm using SQL Server 2008. Apologies if this question is
Apologies for the ambiguous title. I want the items of my listbox to display
My apologies as I'm very much a Java noob. Anyways, I think I've dumbed
Noob question, apologies. I'm compiling Java in Windows Vista's command-line and have so many
I have been trying to position content within a table row. The row in
I am creating a gridview that will be populated based upon a linq statement,
I have the following example in a SQL table Cust Group Sales A 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.