continuous card
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
continuous card
Hi, how can i make a card that's "scrollable" for example in my case, i put all the content from a database in a field, but i don't want only the field to be "scrollable" but all the card, because of the design
while we're on the subject in the same image you can see that the text is not perfectly aligned to the yellow/white bars, does anyone have any idea how to make it become aligned?
Thanks!
as you can see in this image, the text in black comes from the database and the yellow and white bars are part of the design of the background image.while we're on the subject in the same image you can see that the text is not perfectly aligned to the yellow/white bars, does anyone have any idea how to make it become aligned?
Thanks!
Samuele.
Re: continuous card
In short: you can't!

But you can fake it.

Group all the controls of your card, set the rect of the group to the rect of your card and turn on the scrollbars for that group.
Since you have an image in your background, you will need to play with the textsize and textheight of your field.Samuele wrote: ↑Mon Jan 31, 2022 1:07 pmas you can see in this image, the text in black comes from the database and the yellow and white bars are part of the design of the background image.
while we're on the subject in the same image you can see that the text is not perfectly aligned to the yellow/white bars, does anyone have any idea how to make it become aligned?
No success guarantedd, so I would use a DATAGRID here, which has alternating row-colors that fit exactly!
-
- Livecode Opensource Backer
- Posts: 10097
- Joined: Fri Feb 19, 2010 10:17 am
Re: continuous card
You can also do this with a listField or a tabbed field:so I would use a DATAGRID here, which has alternating row-colors that fit exactly!
-
Re: continuous card
What Klaus said.
You only have to "fake" it to the extent that only you know that the card is not scrolling, rather only the gadgetry of that card.
You can use a table field, which is much simpler than a dataGrid. But you will have to control the vertical placement of the small circles when you scroll, so that they track particular lines. Fortunately , this can easily be done. If you need help with that write back.
Craig
You only have to "fake" it to the extent that only you know that the card is not scrolling, rather only the gadgetry of that card.
You can use a table field, which is much simpler than a dataGrid. But you will have to control the vertical placement of the small circles when you scroll, so that they track particular lines. Fortunately , this can easily be done. If you need help with that write back.
Craig
-
- Livecode Opensource Backer
- Posts: 10097
- Joined: Fri Feb 19, 2010 10:17 am
Re: continuous card
Richmond.
The OP wants other controls to scroll in sync with the "field", however that is constructed.
@Samulele. A "form" style of dataGrid can be constructed to do what you want, but there is a significant learning curve for that object.
A table field is ready to go out of the box. You can set the backColor of alternating lines to any color you want.
Here is a crude example stack. It needs work to make it more robust, for example, changing the size or loc of the table field.
Craig
The OP wants other controls to scroll in sync with the "field", however that is constructed.
@Samulele. A "form" style of dataGrid can be constructed to do what you want, but there is a significant learning curve for that object.
A table field is ready to go out of the box. You can set the backColor of alternating lines to any color you want.
Here is a crude example stack. It needs work to make it more robust, for example, changing the size or loc of the table field.
Craig
-
- Livecode Opensource Backer
- Posts: 10097
- Joined: Fri Feb 19, 2010 10:17 am
Re: continuous card
Aha: but doesn't that mean that some things will get "lost" off the top of the cardThe OP wants other controls to scroll in sync with the "field", however that is constructed.
when things are scrolled?
Well, unless you have lots of fiddly scripts to keep things in place, or, of course, they are not inwith the group.
-
Re: continuous card
Yes, which is why a kludge has to anticipate all that sort of stuff. In the very crude example stack I just posted, for example, the circle graphic simply disappears if it "scrolls" too high. There are likely several places where various other stuff has to be dealt with.Aha: but doesn't that mean that some things will get "lost" off the top of the card
when things are scrolled?
Craig
Re: continuous card
Thank You, I will try to put into practice all the knowledge just revealed to me!
Samuele.