Topic: How to add rating stars?
Is it possible to add rating stars to this database?
Will there be a feature added to the form menu on MVD?
Eddie
My Visual Database → General → How to add rating stars?
Is it possible to add rating stars to this database?
Will there be a feature added to the form menu on MVD?
Eddie
Hi Heribertom6466.
I had a similar requirement a while back.
My solution, although not as slick as I'd have liked (but it was quick and it worked) was to import an image of 5 Star ratings onto my form and then align 5 check boxes against the image.
When one of the check boxes was ticked, I then 'greyed out' the other 4 by script to stop people from using more than just 1 rating.
Depending on how you want to structure your table, you could have 5 fields (one for each star rating) or, as I did, have just 1 field and populate it with a value (1-5) depending on which of the 5 check boxes has been ticked (obviously, when re-displaying the form, you then need to take the field value and work out which one of the 5 check boxes gets the tick!).
Hope this helps and maybe gives you some ideas,
Derek.
You can adapt this example for your purpose.
http://myvisualdatabase.com/forum/misc. … download=1
Derek,
That a quick way of approach. That's a brilliant idea.
I'd have to give this a try.
Dmitry,
This is the ideal.. WOW! just completely love it.
The only problem is that I still don't don't what SQL stands for.. LOL
I'll try both ways but, it's going to take me a month to figure out Dmitry's way. LOL
Thanks you guys greatly appreciate it.
Eddue
Hi Heribertom6466,
Attached is a cut down version of the script I used to get my 'star ratings' to work. It's not the most sophisticated by any means (but it works!!). If it helps, feel free to copy (and improve!).
Derek.
I improved your example, added stars to grid
Hi Dmitry, Hi Eddie,
At first, I had defined the 'ratings' field as text and displayed in the grid '*' instead of '1', '** instead of '2' and '***' instead of '3'. This worked quite well and the script was very simple.
But I then redefined the 'ratings' field as integer and displayed '1', '2' and '3' in the grid because I wanted to use tablegrid footers to calculate averages.
But visually, the way you have done it looks much more professional. I have not seen Form1.TableGrid1.Columns.InsertGraphicColumn(n) used in the tablegrid lke this before - it will be very useful for new projects.
Thanks again,
Derek.
Hello Dmitry, Hello Derek,
This 5 rating star just awesome!
I love it!
Thanks guys,
Eddie
Morning Eddie, Morning Dmitry,
Just a couple of more ideas for you, Eddie.
I've taken my original knock-up application and in the tablegrid used '*' instead of numbers. And in the form itself, I've made the 'star' rating system look a bit more 'interactive' by changing the star colour as each of them is clicked.
There are so many ways to approach it - all of which just goes to show how flexible My Visual Database can be.
Hope this has given you enough to go on.
Derek.
Hello guys,
I know this is a bloody old topic, but I needed inspiration for a personal project so I digged this one up.
As a result, here it is optimized as much as I could :
no more checkboxes to choose your rating
just one image and coordinates linked (x,y) to detect the place of the click
also, Tablegrid image is determined from image name as a variable, which results in less code for the Tablegrid image.
Anyway
Wish you all a good day
Mathias
Even more optimized
last minute modification.
My Visual Database → General → How to add rating stars?
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi