Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 10 of 11 total |
Background Images in TSurface.wbi. |
Wed, Nov 25 2015 6:21 AM | Permanent Link |
Steve Gill | Hi Tim,
I added a 679KB background jpg image to tsurface.wbi. When the library is compiled tsurface.wbi blows out to over 10MB. Is there something I can do to make it smaller, besides not including the image. EWB 2.03 B1 Thanks. = Steve |
Wed, Nov 25 2015 1:33 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Steve,
<< I added a 679KB background jpg image to tsurface.wbi. When the library is compiled tsurface.wbi blows out to over 10MB. Is there something I can do to make it smaller, besides not including the image. >> The easiest way to deal with this is to just assign the image at runtime. You can do so before the form creation in the application program source: Application.Surface.Background.Image.Name:='http://www.mysite.com/myimage.jpg'; In general, you should try to keep embedded background images as small as possible, and anything large should be included in the Project Manager as an external file that is bundled with the application. Tim Young Elevate Software www.elevatesoft.com |
Wed, Nov 25 2015 5:15 PM | Permanent Link |
Steve Gill | << The easiest way to deal with this is to just assign the image at runtime. You can do so before the form creation in the application program source:
Application.Surface.Background.Image.Name:='http://www.mysite.com/myimage.jpg'; In general, you should try to keep embedded background images as small as possible, and anything large should be included in the Project Manager as an external file that is bundled with the application. >> Perfect! Thanks Tim!! = Steve |
Sat, Dec 5 2015 7:16 PM | Permanent Link |
Huseyin Aliz myBiss ApS | Tim,
What if mainform background could be different than the other forms backgrounds? Like: Background.jpg for mainform and background2.jpg for all other forms. Also would following work?: Application.Surface.Background.Image.Name:='background.jpg'; // background.jpg are present in output folder. I have started using png files for background images, but later decided to use jpg files because of the size of html file, but compressed html file did not change much after changing to jpg as i expected? Regards, Hüseyin On 25-11-2015 19:33, Tim Young [Elevate Software] wrote: > Steve, > > << I added a 679KB background jpg image to tsurface.wbi. When the library is compiled tsurface.wbi blows out to over 10MB. > > Is there something I can do to make it smaller, besides not including the image. >> > > The easiest way to deal with this is to just assign the image at runtime. You can do so before the form creation in the application program source: > > Application.Surface.Background.Image.Name:='http://www.mysite.com/myimage.jpg'; > > In general, you should try to keep embedded background images as small as possible, and anything large should be included in the Project Manager as an external file that is bundled with the application. > > Tim Young > Elevate Software > www.elevatesoft.com > |
Mon, Dec 7 2015 1:53 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | << What if mainform background could be different than the other forms backgrounds? >>
Sure, each control (actually, each UI element) in EWB can have a different background, just like with HTML/CSS. << Application.Surface.Background.Image.Name:='background.jpg'; // background.jpg are present in output folder. >> Yes, that will work. << I have started using png files for background images, but later decided to use jpg files because of the size of html file, but compressed html file did not change much after changing to jpg as i expected? >> Are you specifying the background image at design-time or run-time ? If the latter (run-time), then the background image won't be included in the HTML. A background image is only embedded in the HTML loader if you specify it at design-time. Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 7 2015 2:23 PM | Permanent Link |
Huseyin Aliz myBiss ApS | Tim,
Ok, so.. Application.Surface.Background.Image.Name is not a global setting - but exists for earch form created? Currently i am specifying background images at design-time, not in runtime. If above works i could set it in runtime in forms oncreate event. Thanks. Regards, Hüseyin On 07-12-2015 19:53, Tim Young [Elevate Software] wrote: > << What if mainform background could be different than the other forms backgrounds? >> > > Sure, each control (actually, each UI element) in EWB can have a different background, just like with HTML/CSS. > > << Application.Surface.Background.Image.Name:='background.jpg'; // > background.jpg are present in output folder. >> > > Yes, that will work. > > << I have started using png files for background images, but later decided to use jpg files because of the size of html file, but compressed html file did not change much after changing to jpg as i expected? >> > > Are you specifying the background image at design-time or run-time ? If the latter (run-time), then the background image won't be included in the HTML. A background image is only embedded in the HTML loader if you specify it at design-time. > > Tim Young > Elevate Software > www.elevatesoft.com > |
Mon, Dec 7 2015 3:32 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Hüseyin,
<< Application.Surface.Background.Image.Name is not a global setting - but exists for earch form created? >> That's not what you asked. You asked if the main form's background image could be different from other forms. Do you want to change the background image of each form, or do you want to change the background image of the *entire application* (Application.Surface) whenever a specific form is active ? Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 7 2015 3:59 PM | Permanent Link |
Huseyin Aliz myBiss ApS | Tim,
Sorry if my question was not clear. What I want is: Mainform -> background.image('logon.jpg'); All other forms -> background.image('background.jpg'); Hope it's more clear now Regards, Hüseyin On 07-12-2015 21:32, Tim Young [Elevate Software] wrote: > Hüseyin, > > << Application.Surface.Background.Image.Name is not a global setting - but exists for earch form created? >> > > That's not what you asked. You asked if the main form's background image could be different from other forms. > > Do you want to change the background image of each form, or do you want to change the background image of the *entire application* (Application.Surface) whenever a specific form is active ? > > Tim Young > Elevate Software > www.elevatesoft.com > |
Mon, Dec 7 2015 4:33 PM | Permanent Link |
Raul Team Elevate | On 12/7/2015 3:59 PM, Hüseyin Aliz wrote:
> Sorry if my question was not clear. What I want is: > > Mainform -> background.image('logon.jpg'); > All other forms -> background.image('background.jpg'); > > Hope it's more clear now You can do that with the form directly by using "background.image.name" for example in the form OnCreate : procedure TForm1.Form1Create(Sender: TObject); begin self.background.image.name := self.name + '.jpg'; end; Application.Surface.Background is for the application itself (not form) so you do not need to touch that at all. Raul |
Mon, Dec 7 2015 4:41 PM | Permanent Link |
Huseyin Aliz myBiss ApS | Raul,
Thanks for the input Regards, Hüseyin On 07-12-2015 22:33, Raul wrote: > On 12/7/2015 3:59 PM, Hüseyin Aliz wrote: >> Sorry if my question was not clear. What I want is: >> >> Mainform -> background.image('logon.jpg'); >> All other forms -> background.image('background.jpg'); >> >> Hope it's more clear now > > You can do that with the form directly by using "background.image.name" > > for example in the form OnCreate : > > procedure TForm1.Form1Create(Sender: TObject); > begin > self.background.image.name := self.name + '.jpg'; > end; > > > Application.Surface.Background is for the application itself (not > form) so you do not need to touch that at all. > > Raul > |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Sunday, December 1, 2024 at 03:59 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |