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

Post's attachments

Attachment icon star-rating-5.0.gif 2.99 kb, 321 downloads since 2015-09-26 

Re: How to add rating stars?

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.

Post's attachments

Attachment icon star ratings.jpg 31.73 kb, 289 downloads since 2015-09-26 

Re: How to add rating stars?

You can adapt this example for your purpose.
http://myvisualdatabase.com/forum/misc. … download=1

Dmitry.

4 (edited by heribertom6466 2015-09-27 08:11:54)

Re: How to add rating stars?

Derek,

That a quick way of approach. That's a brilliant idea. smile
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. big_smile

Eddue

Re: How to add rating stars?

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.

Post's attachments

Attachment icon 3stars.zip 384.05 kb, 508 downloads since 2015-09-28 

Re: How to add rating stars?

I improved your example, added stars to grid

Post's attachments

Attachment icon 5stars.zip 39.23 kb, 500 downloads since 2015-09-28 

Dmitry.

Re: How to add rating stars?

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.

Re: How to add rating stars?

Hello Dmitry, Hello Derek,

This 5 rating star just  awesome!
I love it!

Thanks guys,
Eddie

Re: How to add rating stars?

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.

Post's attachments

Attachment icon 3stars interactive.zip 418.91 kb, 496 downloads since 2015-09-29 

Re: How to add rating stars?

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

Post's attachments

Attachment icon 5stars-2017.zip 355.61 kb, 367 downloads since 2017-04-21 

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: How to add rating stars?

Even more optimized smile

last minute modification.

Post's attachments

Attachment icon 5stars-2017v2.zip 355.42 kb, 420 downloads since 2017-04-21 

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor