Page 1 of 1

scroll images beside the database grid when scrolling?

PostPosted: Fri Sep 19, 2014 5:50 am
by yanzco
i waas experimenting something like this.

in a database grid.. / table

it shows whatever datas in the field / record etc of the table

then beside the rectangle. are small images, i used a small 20x20 images of a check and x
ex:
-------------------- (rectangle starts here)
/ | yes
x | no
/ | yes
x | no
x | no
x | no
-------------------- (rectangle ends here)
| yes ..> this record wasnt displayed because the rectangle is not big enough
| yes ..> this record wasnt displayed because the rectangle is not big enough


note that the check and x images are beside the rectangle where the table is displayed..

the rectangle is not big enough to show all records right?.. so if i scroll up and down or press up and down button.. it scrolls down to display the next record

i was wondering how can i integrate the images i have per record to change whenever the list scrolls up and down..

like this

| yes
-------------------- (rectangle starts here)
x | no
/ | yes
x | no
x | no
x | no
/ | yes ..> scroll down once, and the check image shows and all other images changes corresponding to whatever data in the record line it is
-------------------- (rectangle ends here)
| yes ..> this record wasnt displayed because the rectangle is not big enough



sorry for the bad english, im having a hard time to explain what i really mean..

Re: scroll images beside the database grid when scrolling?

PostPosted: Fri Sep 19, 2014 9:44 pm
by yanzco
Image
heres a screenshot..

if the list is long.. and i scroll down.. i want the images beside each record to change also..

Re: scroll images beside the database grid when scrolling?

PostPosted: Sat Sep 20, 2014 5:43 am
by Gaev
yanzco:

1) It looks like you show the (green) check mark whenever "OUT is equal to 1"; if so, one solution would be to ...

a) add a field/column (say it is called called OUTImage)

b) populate OUTimage with one of the two (small) images that correspond with the value of OUT

c) use the dbpSetGridProperties command with the property ShowGraphics=yes ... from the Help file ...
ShowGraphics=yes/no
Yes = display picture fields in the grid. No = don't display picture fields.


d) use dbpSetColumnOrder to position OUTimage to the left of the other fields

2) Alternately, you might consider ...

a) copying 22 records (or whatever number fits in the Rectangle) at a time to a temporary Table ... and show the records in this temporary Table within the Grid

b) setup your own buttons for the user to request "the next/previous 22 records" (or even 11 records for a half grid scroll)


3) Depending on the nature of your "required user interface", you might also look into the use of Grid properties like ...

- ShowScrollBars=None
- ShowNavigationBar=no