Data Grid or Table Field and suggestions
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 46
- Joined: Fri Aug 02, 2013 12:14 am
Re: Data Grid or Table Field and suggestions
Guys...your making me laugh.
I am a Florida Gator Grad in 96...yea im old. Not really a secret. Thnaks for the # suggestion.
Any ways. I am just having a time getting a stupid blue or red dot in a gird.
Could you guys help me with this...I tried making a bitmap red and blue circle and its not populating and then a circle graphic that looks good but can figure out how to populate with a grc? was there any lessons on this as well.
I dont want to populate the grid with a bunch of circles and just hide or make them visible. I would like to say put "banker" into item 1 of line 1 of table "BacTable" or something like this. I am sorry I have not worked with graphics in Livecode only text base stuff.
Thanks again
I am a Florida Gator Grad in 96...yea im old. Not really a secret. Thnaks for the # suggestion.
Any ways. I am just having a time getting a stupid blue or red dot in a gird.
Could you guys help me with this...I tried making a bitmap red and blue circle and its not populating and then a circle graphic that looks good but can figure out how to populate with a grc? was there any lessons on this as well.
I dont want to populate the grid with a bunch of circles and just hide or make them visible. I would like to say put "banker" into item 1 of line 1 of table "BacTable" or something like this. I am sorry I have not worked with graphics in Livecode only text base stuff.
Thanks again
Re: Data Grid or Table Field and suggestions
Well, if you were trying to read a 'bok' (which was made of tree bark), I can't imagine the reading of it being 'light' (weight wise, anyway). Can you imagine a 30 page pamphlet made of birchwood? It would weigh a LOT
Glad to give you the chuckle, but '96 makes you barely broken in, Klaus and I have wrinkles older than youno1g8tor96 wrote: ↑Thu Aug 02, 2018 5:40 pmGuys...your making me laugh.
....I am a Florida Gator Grad in 96...yea im old. Not really a secret.
-
- Livecode Opensource Backer
- Posts: 46
- Joined: Fri Aug 02, 2013 12:14 am
Re: Data Grid or Table Field and suggestions
lol.
I hope maybe your wisdom can help me out with this. This should be a simple little program to put dots in a grid and its making me insane.
Thank you
Mike
I hope maybe your wisdom can help me out with this. This should be a simple little program to put dots in a grid and its making me insane.
Thank you
Mike
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Data Grid or Table Field and suggestions
Mike.
We were not talking about creating a matrix of individual controls, butt rather using a single table field. That gadget has the XY stuff already in place, ready to go.
Do you understand what I meant by setting the "imageSource" property of each character in that field? Do you understand that when a single character is placed in each "cell", it will appear as either a red or blue dot?
Write back...
Craig
We were not talking about creating a matrix of individual controls, butt rather using a single table field. That gadget has the XY stuff already in place, ready to go.
Do you understand what I meant by setting the "imageSource" property of each character in that field? Do you understand that when a single character is placed in each "cell", it will appear as either a red or blue dot?
Write back...
Craig
-
- Livecode Opensource Backer
- Posts: 46
- Joined: Fri Aug 02, 2013 12:14 am
Re: Data Grid or Table Field and suggestions
Craig
I see what I was doing wrong. I was not populating a character in the cell before setting the image. I will have to tell it to put a 1 or something in it first then set the image source. I need get a better circle without a background. Do I have to get make a PNG file or can I make a circle graphic and set the image to that with livecode? They look much cleaner with the circle tool?
Also can you set different padding and spacing within the cells to align the graphic better?
Thanks
I see what I was doing wrong. I was not populating a character in the cell before setting the image. I will have to tell it to put a 1 or something in it first then set the image source. I need get a better circle without a background. Do I have to get make a PNG file or can I make a circle graphic and set the image to that with livecode? They look much cleaner with the circle tool?
Also can you set different padding and spacing within the cells to align the graphic better?
Thanks
-
- Livecode Opensource Backer
- Posts: 46
- Joined: Fri Aug 02, 2013 12:14 am
Re: Data Grid or Table Field and suggestions
Craig,
I am playing with it and see how resizing changes it but can get it centered in the cell?
Thanks
Mike
I am playing with it and see how resizing changes it but can get it centered in the cell?
Thanks
Mike
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Data Grid or Table Field and suggestions
Hi.
Of course we are fitting a function into a space that is not exactly built for it.
I assume you have an image and will soon have a "characterImage".
So say you have a table field with several rows and columns filled with a single char in each "cell". And you set the imageSource of ONE of them to the image you are using. This will be the "characterImage". Now if you change the rect of the image in the property inspector, you will see the "characterImage" change at the same time, live.
Play with the textSize of the field, and maybe the margins. That is where the action is. The "characterImage" just substitutes for the char; it has no other llfe.
Know that there is no way to set the size of the "characterImage" directly via text properties. Changing, say, the textSize of a particular line will indeed change the text in that line, but the"characterImage" will not change. Try it.
But this should not matter. Once you have chosen a field of the right size, and a textSize and the tabStops to space the "characterImages" the way you want them in both X and Y, you simply have to move the entire field until it all looks right.
As for getting a decent colored circle, you need to make one in some other program and save it as a png or whatever. Then when you import it, you can adjust its rect.
Is this clear?
Craig
Of course we are fitting a function into a space that is not exactly built for it.
I assume you have an image and will soon have a "characterImage".
So say you have a table field with several rows and columns filled with a single char in each "cell". And you set the imageSource of ONE of them to the image you are using. This will be the "characterImage". Now if you change the rect of the image in the property inspector, you will see the "characterImage" change at the same time, live.
Play with the textSize of the field, and maybe the margins. That is where the action is. The "characterImage" just substitutes for the char; it has no other llfe.
Know that there is no way to set the size of the "characterImage" directly via text properties. Changing, say, the textSize of a particular line will indeed change the text in that line, but the"characterImage" will not change. Try it.
But this should not matter. Once you have chosen a field of the right size, and a textSize and the tabStops to space the "characterImages" the way you want them in both X and Y, you simply have to move the entire field until it all looks right.
As for getting a decent colored circle, you need to make one in some other program and save it as a png or whatever. Then when you import it, you can adjust its rect.
Is this clear?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Data Grid or Table Field and suggestions
I should have read more carefully.Also can you set different padding and spacing within the cells to align the graphic better?
A table field is adorable, but is limited in certain ways, derived from the limitation that it is just a field, after all.
What you want to play with are the "tabStops" and the textHeight. These two properties will allow you to modify the horizontal and vertical spacing of the "cells". Play with both right in the inspector. If you have this down, there is no longer any issue with justification, since moving the entire field will align the chars vertically to any index you choose.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Data Grid or Table Field and suggestions
There is a tabAlign property that will center your images inside each tab.
I'd start with a plain field. Import a png image for the circle. Set the tabstops of the field to as many columns as you need and set the tabAlign of each tabstop to center:
When you need to add a dot, put a character into the appropriate item of the correct line and set its imagesource to the ID of the png. Once you have a few of these you'll be able to adjust the tabs and the textheight of the field to make them fit visually.
You're right images aren't as clear as vector graphics but for now that's all we can use. If you make the png at a high resolution, or make it large and resize it in LC, it might look better.
I'd start with a plain field. Import a png image for the circle. Set the tabstops of the field to as many columns as you need and set the tabAlign of each tabstop to center:
Code: Select all
set the tabAlign of field 1 to "center, center, center, center, center, center" - - six tabs
When you need to add a dot, put a character into the appropriate item of the correct line and set its imagesource to the ID of the png. Once you have a few of these you'll be able to adjust the tabs and the textheight of the field to make them fit visually.
You're right images aren't as clear as vector graphics but for now that's all we can use. If you make the png at a high resolution, or make it large and resize it in LC, it might look better.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Data Grid or Table Field and suggestions
To give Jacque's example a bit more clarity (I don't think it needs it, but figure it can't hurt), you can look at this lesson about putting a table in an ordinary field to get you started visualizing.
-
- Livecode Opensource Backer
- Posts: 46
- Joined: Fri Aug 02, 2013 12:14 am
Re: Data Grid or Table Field and suggestions
Thanks guys for all the help. Im almost done.
Mike
Mike