Am Using Visual studio 2010 and coding by C#. Now i want to do a star rating control ie I have some values within 5, not more than that and i want to show the value rated by start based on the rating. Below is the clear scenario.
If I get a value 5 then i have to to show all 5 star filled up with some colour.
If i get a value 3 then i have to show 3 star which is filled up with some colour and rest stars as empty.
If i get the value 3.5 theh i have to show 3 start which is filled up with colour and next 4th star with HALF FILLED and another HALF and one star as empty ie without colour.
If i get the value some 4.2 means i have to show 4 starts which is filled with colour completely and the last only 0.2 % should be filled with colour and rest part as empty.
How can i achieve this?? Am using ajax control and i don't want to use jquery please note.
Can any one help me in this??
Thanks
I guess this is exactly what you want
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Rating/Rating.aspx
I think what you need is this......
CLICK ME
Only AJAX and No Jquery used just as you want.
Related
I want to create unresponsive sliders for .net framework to display at the website. The slider should look like this or something similar: https://jqueryui.com/slider/#rangemin.
The maximum value for slider should be 10, and minimum would be 1.
The problem is, I want the slider to be:
Unresponsive, since I only want to DISPLAY the average rating, not receive input from users.
Dynamic: The number of slider depends on how many inputs that I received from customer. If I don't have any inputs, the slider shouldn't be seen. But if the inputs are in certain values (e.g. 17), then there should be 17 sliders displayed.
The value displayed from the slider should be AVERAGE rating value. So, in some cases, there will be data displayed in 0 or 1 d.p.
I tried to search for solutions on the Internet, but the only solution that I received is by using JQuery. But still, the no. of sliders are not dynamic.
Note: I have a database from back-end system, and I already calculate the average rating value. I only want to make the slider display the rating in 1 d.p.
I'm trying to develop a tablature editor with a specific look, and I'm struggling to display my controls as I want. I think I'm doing it the wrong way so I need your help! I'm working on Visual Sutdio with C# / Winforms.
Ideally, this should look like this : [1]: https://i.stack.imgur.com/B3q5r.png
Basically, this is an A4 sheet on which I display a datagridview with custom borders. As I progressively fill the datagridview, this one should expand: I do that by adding columns dynamically.
The problem is when I reach the right border of the sheet, it should expand on a new line (like a flow layout panel: when there's no more space the control is added on a new line).
I don't manage to do that. If I add more columns to my datagridview, a horizontal scrollbar appears instead of going on a new line. I tried to mix my datagridview with a flowlayoutpanel but I can't make it work.
Have you got any idea on how to do that? Any help would be highly appreciated.
EDIT :
So in my picture, the grid represents the subdivision of the beat (musically speaking). Each beat is divided in 4 subdivisions (=4 columns).
The numbers represent the notes on the instrument, and several notes can be played at the same time (that's why there are sometimes 2 or more notes in the same column). On the contrary, we can also play 0 notes at a given time, that is why some columns are empy. The user write these notes
Consequently, 1 beat = 1 grid of 4 columns * 4 rows (4 notes maximum can be played at the same time).
The horizontal line is just an indication wether the note should be played with the right hand (above the line) or the left hand (below the line). When the user writes the notes, he decides where to write them.
Each time I add a beat, I add 4 columns. So my whole tablature is a grid of 4 rows * X columns (X being a multiple of 4), in which the user writes the notes he wants. My problem is that I would like to "cut" my grid and display it on several lines so that it fits an A4 sheet.
I am new to Unity.
I am converting my Sudoku game written in WPF to Unity2D. I converted everything. However I cant achieve 9*9 grid with Buttons as I did in WPF.
In WPF I created 81 buttons with same event. So when it is called I jsut got their position displayed keyboard with only numbers that cell allowed.
Here is what I needed
Here is what I did.
1: I inserted canvas then tried vertical layout(for adding 3 rows) without success
2: Then I tried grid layout with canvas with fixable count column no success
3: grid layout with flexible option still no result.
I also tried via coding using GUI.BOX, and all still the result is not good.
How can I do it?
Do not use GridLayout, it is only for fixed size "icons" - irrelevant here, do not use.
First use VerticalLayoutGroup
include ..
Don't forget you must put a LayoutElement on each of your three items.
Get that working first.
Then, for your MIDDLE item, add a horizontal group and make that work.
Need help with automating vertical scrolling. I'm a teacher and my 15 year old son is learning C# to help with making online worksheets. We are currently making a computer based worksheet that teaches 3 phonics sounds using 3 letter words (cat, dog, fox, etc). The form is constructed of four rows with 5 pictures in each row. The actual worksheet used as a template can be seen at http://www.tampareads.com/phonics/phondesk/cvc/cvc-1.htm - Because of size limitations I am displaying only 2 rows at a time. When the student clicks on the correct letter for the last problem in row 2 we want the form to scroll down to view rows 3 and 4. Is there a way to get have the form to scroll down to view these last 2 rows automatically, so the student does not have to scroll manually? We've been reading and trying for days but no luck. We tried using "ScrollControlIntoView" but it would appear to work, but then when clicking the answer of the first problem in row 3, it jumps back up to row 1. We are pulling our hair out!! Any help would be appreciated.
IF your using jQuery or could add it to your page, you could do something like this.
var position = $(window).scrollTop() + 100
$('.correctLetter').click(function () {
$('html, body').animate({ position }, 'slow');
});
Position = the amount already scrolled down the page + 100. You may need to adjust the 100 to however many pixels you need to scroll.
$(.correctLetter) refers to a class on whatever element you want to trigger the scroll.
I know someone can help me.
I'm busy developing a select the word game but I'm not sure how to highlight the selected letters.
I'm currently creating a grid of blocks.
Then when the user clicks and moves the mouse from on block to another I use the Rect to check if they intersect when they do I mark that block as selected but I need to ignore the block number 2 when block number 3 is selected same thing should happen when block number 4 is selected. So that pattern is: 1,3,5,7 blocks number 2,4,6 should not be selected.
Kind regards,
Johan
I am assuming it to be a standard word-guessing game where word letters always fall in the boxes which are on a standing-line, sleeping-line or line at angle of 45 degrees. In which case you just need a start box and end box of user's input and you can select/mark all the boxes from starting box by adding +1 till you reach last box.
Say user stared at startBox(rowStart,colStart) till lastBox(rowLast,colLast)
So all you need to do is
rowPos = startBox.rowStart;
colPos = startBox.colStart;
do{
mark startBox(rowPos, colPos)
rowPos++;
colPos++;
} while(rowPos<=rowLast && colPos<=colLast)
Note: You will have to evaluate startBox and lastBox to figure out whether user is going bottom-right, bottom-left, top-right or top-left and accordingly add/subtract 1 to row and/or column.