2 percentage values in a single cell. lazarus / 8-Other ---------------------------------------------------------------------- taazz · 2014-03-02 12:17 I'm looking for ideas on how to represent 2 different values graphically in a single grid cell. I can only think of a solution like the attached image is there something else I could take a look at? Keep in mind that the size of the attached image is probably what the end user will see at least for now. Just for your information the idea is that the percentage value will be calculated as the average of the sub items and the current item percentage. I need a way to show the current value and the calculated at the same time. ---------------------------------------------------------------------- typo · 2014-03-02 13:54 I don't know whether I correctly understand your problem, I suppose you have 9 cells of a TStringGrid and need to draw 2 values at each of them. So you could separate the values with simple spaces or a dash or slash character on OnDrawCeel event handler. ---------------------------------------------------------------------- taazz · 2014-03-02 13:59 its a percentage type of value, there are two values to be painted in a single cell as a progress bar of a short, no text will be shown. ---------------------------------------------------------------------- typo · 2014-03-02 14:15 What is the problem about: Code: [Select]procedure TForm1.StringGrid1DrawCell(Sender : TObject; aCol, aRow : Integer;   aRect : TRect; aState : TGridDrawState); begin   StringGrid1.Cells[aCol, aRow] := FloatToStr(FirstValue) + '%'  + '  -  ' +  FloatToStr(SecondValue); end; ---------------------------------------------------------------------- BigChimp · 2014-03-02 14:16 @typo: my guess: if you have lots of cells, I can imagine it gets hard to get a quick overview of the various percentages. Having it displayed graphically is a good way to get a general overview of the relations/proportions of the various percentages.... ---------------------------------------------------------------------- taazz · 2014-03-02 14:53 Lets make things a bit more specific see attached image for the main screen. Now think of the percentage column as the overall completion percentage including the sub tasks. In some cases the parent task is only present for grouping purposes in the screen shot the "working on" task would be such an example. There are also tasks that except of the sub task completion they need a completion of there own. The "field editor" task is an example of the second group which requires extra work eg constrains or validation code that depends on the field's settings. It would be wise to avoid adding an extra sub task when the parent task can be used to monitor that making things a bit simpler. As it is now it shows the overall progress including the parent task's progress, I need to show the parent task's progress with the overall progress at the same but with out stilling screen space from the main column (title) by adding an extra column. The idea is to be able to show as much information as possible on screen with out the need of a second form/screen or get a quick picture of the project's overall progress (ee fit everything in a single screen if possible). ---------------------------------------------------------------------- engkin · 2014-03-02 15:08 Use the the same cell, maybe beneath the text or behind it. Check attached image. ---------------------------------------------------------------------- taazz · 2014-03-02 16:05 Although as an idea is superb I see a few problems 1 the title columns is huge and dynamically sized to fill all the "free" space, if the program is maximized this will cover more than half the screen it will get ridiculously long for a progress bar 2 as you can see there are already 2 types of information shown on that column, title and a portion of the comments also there is already a known position for progress in the grid it would be better to keep same type of information grouped together especially since the column's inline editor will edit the task's completion percentage. 3 the title background color will be changing  the closer it is to the due date from white to red or what ever the end user selects, making it a bit hard to select an appropriate color for the progress bar. Let me think about it though it might work if I put the overall in the title instead of the task's percentage. How about something like the attachment? ---------------------------------------------------------------------- engkin · 2014-03-02 18:07 I agree with you. I might be able to find a solution for the size issue you mentioned in number 1, but you do have a point and grouping same type of information together and using the background to indicate due date cancels this idea. I do like the original design you are using for one simple percentage, so I extended it a little bit. It is just an idea. Check the attachment.