Graphic in scrolling list field disappears
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Graphic in scrolling list field disappears
Hope someone can help me with this.
I have the problem that if I put a graphic in place of a character in a scrolling list field as soon as the first part of that line scrolls out of the field window the graphic disappears. This happens because i scroll from top to bottom and that the graphic placeholder is the bottom left corner. As soon as the line that holds the graphic scrolls out of field window the graphic disappears (which is logical to me).
I would like the placeholder to be the top left corner of the graphic so when I scroll down the graphic stays in view as long as possible.
Is this possible?
I would also like to know how to find out if a character has an imagesource set.
I do have a demo stack but cannot upload it (message I get is: The extension livecode is not allowed.)
Instead see the screenshot of the stack attached.
Any help would be appreciated.
Kind regards,
Paul (MrCoolLion)
I have the problem that if I put a graphic in place of a character in a scrolling list field as soon as the first part of that line scrolls out of the field window the graphic disappears. This happens because i scroll from top to bottom and that the graphic placeholder is the bottom left corner. As soon as the line that holds the graphic scrolls out of field window the graphic disappears (which is logical to me).
I would like the placeholder to be the top left corner of the graphic so when I scroll down the graphic stays in view as long as possible.
Is this possible?
I would also like to know how to find out if a character has an imagesource set.
I do have a demo stack but cannot upload it (message I get is: The extension livecode is not allowed.)
Instead see the screenshot of the stack attached.
Any help would be appreciated.
Kind regards,
Paul (MrCoolLion)
Re: Graphic in scrolling list field disappears
Hi.
Are you using the "imageSource" as a substtiute for the character in the line in question.
Craig Newman
Are you using the "imageSource" as a substtiute for the character in the line in question.
Craig Newman
Re: Graphic in scrolling list field disappears
Hi Paul,
Best
Klaus
you need to ZIP the stack first, then you can upload it here.mrcoollion wrote:...I do have a demo stack but cannot upload it (message I get is: The extension livecode is not allowed.)
Best
Klaus
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Graphic in scrolling list field disappears
So here is my test stack.
Kind regards,
Paul
Kind regards,
Paul
- Attachments
-
- TestImageInList1.zip
- (10.5 KiB) Downloaded 232 times
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Graphic in scrolling list field disappears
Yes I am ... see test stackdunbarx wrote:Hi.
Are you using the "imageSource" as a substtiute for the character in the line in question.
Craig Newman
Re: Graphic in scrolling list field disappears
Hi Paul,
"imagesource" actually REPLACES one character in a field, but behaves
as a "simple" character furthermore, means it goes with the text like
any other character in the field would do. Know what I mean?
To check if a character has an imagesource, you do:
Best
Klaus
"imagesource" actually REPLACES one character in a field, but behaves
as a "simple" character furthermore, means it goes with the text like
any other character in the field would do. Know what I mean?
To check if a character has an imagesource, you do:
Code: Select all
...
put the imagesource of char 1 of fld "text with images" into tIS
if tIS = EMPTY then
## NO imagesource, do what you need to do here...
end if
...
Klaus
Re: Graphic in scrolling list field disappears
Hi Paul,
just tested your stack and I think this is (more or less) correct behavior!
You "forced" a textheigtht of 13 px for the field and this way, images in imagesources
that are higher than 13 px will actually get "overlayed" by the other text in the field.
Very clever in fact!
Unfortunately these images will disappear when scrolling to a certain amout in the field
as we can experience in your stack. Not sure why, sorry.
I don't think you can do this with a field and imagesource satisfyingly at all.
I would probably do this with a DATAGRID of type FORM, but that is definitively
not beginners stuf.
Best
Klaus
just tested your stack and I think this is (more or less) correct behavior!
You "forced" a textheigtht of 13 px for the field and this way, images in imagesources
that are higher than 13 px will actually get "overlayed" by the other text in the field.
Very clever in fact!

Unfortunately these images will disappear when scrolling to a certain amout in the field
as we can experience in your stack. Not sure why, sorry.
I don't think you can do this with a field and imagesource satisfyingly at all.
I would probably do this with a DATAGRID of type FORM, but that is definitively
not beginners stuf.
Best
Klaus
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Graphic in scrolling list field disappears
I found out the reason why my statementKlaus wrote:Hi Paul,
"imagesource" actually REPLACES one character in a field, but behaves
as a "simple" character furthermore, means it goes with the text like
any other character in the field would do. Know what I mean?
To check if a character has an imagesource, you do:BestCode: Select all
... put the imagesource of char 1 of fld "text with images" into tIS if tIS = EMPTY then ## NO imagesource, do what you need to do here... end if ...
Klaus
Code: Select all
put the imageSource of char 1 of line LineSelectNBR of field "ShowChat" into tempvar01
Code: Select all
put the hilitedLine of field "ShowChat" into LineSelectNBR // This works as expected :-)
//put the selectedline of field "ShowChat" into LineSelectNBR // Gives the line and field 1 as result (strange.... :-0 )
Re: Graphic in scrolling list field disappears
Hi Paul,
do yourself a favour and look up everything in the dictionary!
"the selectedline" is NOT a property of a specific field, but a "global" one,
that's why it returns also the FIELD description!
Best
Klaus
do yourself a favour and look up everything in the dictionary!
"the selectedline" is NOT a property of a specific field, but a "global" one,
that's why it returns also the FIELD description!
As I already wrote, this is not possible with a field, check the dictionary entry for "imagesource".Now I still need to fix the scrolling and disappearing of the graphic issue.
Best
Klaus
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Graphic in scrolling list field disappears
Thank you very much for your support Klaus..Klaus wrote:Hi Paul,
do yourself a favour and look up everything in the dictionary!
"the selectedline" is NOT a property of a specific field, but a "global" one,
that's why it returns also the FIELD description!
As I already wrote, this is not possible with a field, check the dictionary entry for "imagesource".Now I still need to fix the scrolling and disappearing of the graphic issue.
Best
Klaus
Regards,
Paul
Re: Graphic in scrolling list field disappears
It's all in a day's work of a Livecode forum guru! 

Re: Graphic in scrolling list field disappears
I didn't look at your stack, but it might work if you group the field and scroll the group.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Graphic in scrolling list field disappears
I will give it a try.jacque wrote:I didn't look at your stack, but it might work if you group the field and scroll the group.
Thx

-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Graphic in scrolling list field disappears
Gave it a try.. no luck.. same behavior. Was worth the try though ... thx ...mrcoollion wrote:I will give it a try.jacque wrote:I didn't look at your stack, but it might work if you group the field and scroll the group.
Thx

Re: Graphic in scrolling list field disappears
Hi Paul
what exactly did you try?
This is a nifty trick and surely works, if applied correctly
Best
Klaus
what exactly did you try?
This is a nifty trick and surely works, if applied correctly

Best
Klaus