Ulugbek Posted January 20, 2016 Share Posted January 20, 2016 Hi All How set background default image UNIDBImage from source folder? Quote Link to comment Share on other sites More sharing options...
adragan Posted January 21, 2016 Share Posted January 21, 2016 MainModule.BackGroud.URL := 'files/......some picture' doen't work ? Quote Link to comment Share on other sites More sharing options...
Ulugbek Posted January 22, 2016 Author Share Posted January 22, 2016 Hi I mean UNIDBImage Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2016 Share Posted January 22, 2016 Hi, You can create a new component based TUniCustomDBImage and override method GetBlankImageUri, For example: unit UniExDBImage; unit UniExDBImage; interface uses System.SysUtils, System.Classes, Vcl.Controls, Vcl.Forms, uniGUIBaseClasses, uniGUIClasses, uniImage, uniDBImage; type TUniExDBImage = class(TUniCustomDBImage) private { Private declarations } FBlankImageURL: string; protected { Protected declarations } function GetBlankImageUri: string; override; public { Public declarations } published { Published declarations } property DataField; property DataSource; property Center default True; property AutoSize; property Stretch; property Proportional; property Align; property Anchors; property ClientEvents; property Transparent; property ScreenMask; property LayoutConfig; property PersistentCache; property Draggable; property OnEndDrag; property OnClick; property OnDblClick; property OnMouseDown; property OnMouseUp; property OnMouseEnter; property OnMouseLeave; property OnResize; property OnAjaxEvent; property BlankImageURL: string read FBlankImageURL write FBlankImageURL; end; procedure Register; implementation procedure Register; begin RegisterComponents('Samples', [TUniExDBImage]); end; { TUniExDBImage } function TUniExDBImage.GetBlankImageUri: string; begin Result := FBlankImageURL; end; end. Best regards. Quote Link to comment Share on other sites More sharing options...
Ulugbek Posted January 22, 2016 Author Share Posted January 22, 2016 Thank you I will try Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.