Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder 2 Preview » View Thread |
Messages 1 to 3 of 3 total |
Setting Image at runtime |
Fri, Feb 20 2015 7:25 AM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | Has anybody worked how how to change an image at runtime.
I have my image update depending upon a flag and am using: if Appointment.Accepted = true then AcceptedImage.Background.Image.Name := 'GreenLed16.png' but the image does not show. -- Chris Holland [Team Elevate] |
Fri, Feb 20 2015 8:09 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Chris,
<< but the image does not show. >> Is there already a background image on there from design-time/an interface ? If so, then you're hitting a bug. In the WebUITypes, remove the indicated line below: procedure TBackgroundImage.SetName(const Value: String); begin if (Value <> FName) then begin FName:=Value; if (FName='') then <<<<<<<< Remove FData:=''; DoChanged(scBackgroundChanged); end; end; That should fix it. The problem is that the Data member is populated via the design-time/interface settings, and that if condition prevents the Data member from being cleared when you assign a Name at runtime. The Data member is for accepting straight-up base64-encoded data from the interfaces, etc., and it takes precedence over the Name member. Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 20 2015 9:28 AM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | Yes, that has fixed it.
Thanks Tim. Chris Holland [Team Elevate] On 20/02/2015 13:09, Tim Young [Elevate Software] wrote: > Chris, > > << but the image does not show. >> > > Is there already a background image on there from design-time/an > interface ? If so, then you're hitting a bug. In the WebUITypes, remove > the indicated line below: > > procedure TBackgroundImage.SetName(const Value: String); > begin > if (Value <> FName) then > begin > FName:=Value; > if (FName='') then <<<<<<<< Remove > FData:=''; > DoChanged(scBackgroundChanged); > end; > end; > > That should fix it. > > The problem is that the Data member is populated via the > design-time/interface settings, and that if condition prevents the Data > member from being cleared when you assign a Name at runtime. The Data > member is for accepting straight-up base64-encoded data from the > interfaces, etc., and it takes precedence over the Name member. > > Tim Young > Elevate Software > www.elevatesoft.com |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |