Jump to content

Setting Background Image in Mainmodule but nothing shown on the Browser !


AMIT

Recommended Posts

I create new blank uniGUI project and try to set background picture in the Mainmodule,  When I run the program there is no background picture shown on the browser.     Can you tell me how to make it work? 

I have add

 

procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject);
begin
  Background.Url:=UniServerModule.UniRoot+'files\home_bkgrnd.png';
end;

 

It also doesn't work at all.   Is it a bug?

Link to comment
Share on other sites

 

please try 

Background.Url:='files\home_bkgrnd.png';

 

It also doesn't work at all.    I don't know why it doesn't work.   It's simple program just setup the property and it should work fine.   I use the latest build.(1279), Windows 10 x64.    Any clue to make it work or what it should be the problem.

Link to comment
Share on other sites

No Login Screen.   Just simple Application.    I create Project using uniGUI Application Wizard.        I put 'home_bkgrnd.png' file in files folder (\uniTESTBKGND\Debug\Win32\files).   Then set the Background\Picture property in the MainModule and Run Program.     It doesn't work on Firefox and Chrome Browser.     I notice that after I set Background\picture property it will show (TdxPNGImage) in the picture property (Object inspector).    I have devExpress on my system too,   Is this the cause of the problem?

Link to comment
Share on other sites

JPEG also doesn't work.     It means that uniGUI and DevExpress cannot be installed on the same system, isn't it?    I will try to remove DevExpress and see if it solve the problem.    I'll let you know.

Link to comment
Share on other sites

I have removed DevExpress.   I set Background\picture property it will show (TPNGImage) in the picture property when select png file format and (TJPEGImage) when select Jpg file format.   Try to run it again.    Problem still exist! No picture show on the screen just only a white blank page.   What should I do?    Please help.

Link to comment
Share on other sites

Its behavior very strange.    I set MainFormDisplayPage = mfPage.   There is no Background image display even I change background to any file.    So I change the MainFormDisplayPage = mfWindow then I got the Background images only the jpeg file format.   PNG had never been displayed at all.   

The strange behavior is when I change to any other jpeg files  the background image is fixed for only one file.   example I set url = files/truck.jpg then it displayed OK when I change to any other jpg for example url = files/xxxx.jpg.   It keep display truck.jpg as a background.   So I think it may be browser cache the old html file.   So I clear all cache but it still be the same.   I test it many times.    I view (firefox) Page Source for HTML, the Url in the html is always link to 'files/truck.jpg' even I change the content of Background/url property to any file.  (every time I change I recompile and run). 

 

Finally,  I decide to delete this project (delete its folder) and Create a new project using uniGUI Application Wizard again.   This time every thing look ok except it cannot display PNG File format.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...