avoid the grey of an img with an invalid filename

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

avoid the grey of an img with an invalid filename

Post by jmburnod » Mon Dec 05, 2011 10:55 pm

Hi All,

I have an img with a valid filename
I set the filename of this img to an invalid filename, it becomes grey
I set the filename of this img to empty, it remains grey
I expect it becomes white

Is there a way to avoid the grey ?

Best regards

Jean-Marc
https://alternatic.ch

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: avoid the grey of an img with an invalid filename

Post by mwieder » Mon Dec 05, 2011 11:02 pm

Jean-Marc-

I'm going to make a guess here: you want the image to be white in order to blend in with a white background as if there were no image present. If that is the case, when you sent the filename to empty, why not just hide the image? And show it again when you set the filename to an existing file?

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: avoid the grey of an img with an invalid filename

Post by Klaus » Tue Dec 06, 2011 11:26 am

Hi Mark,

nevertheless I consider this a BUG!

The images should become transparent again after setting the filename to empty again, but it doesn't!
I think the image should NOT turn grey at all after setting an invalid filename!
And I already reported this at least 6 years ago. :?


@Jean-Marc,

in your case you should check "the result" immediately after setting the filename and hide the image if the result is not empty!


Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: avoid the grey of an img with an invalid filename

Post by jmburnod » Tue Dec 06, 2011 5:54 pm

Hi Mark and Klaus,
Thank for reply
check "the result" immediately after setting the filename and hide the image if the result is not empty!
Ok. I'll do that

Best regards

Jean-Marc
https://alternatic.ch

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: avoid the grey of an img with an invalid filename

Post by mwieder » Tue Dec 06, 2011 7:36 pm

Klaus-

I agree, but the question was not "is this a bug?" but "how do I do this?"

:D

Post Reply