vbdavie Posted December 7, 2020 Share Posted December 7, 2020 Here's an attached screen shot of my stringgrid. The first data row(under the column headers) is always highlighted no matter where I click on the grid. Is this expected behavior? Here is my StringGrid properties object UniStringGrid3: TUniStringGrid Left = 8 Top = 144 Width = 185 Height = 105 Hint = '' FixedCols = 0 RowCount = 3 ColCount = 3 DefaultRowHeight = 18 Options = [goVertLine, goHorzLine] ShowColumnTitles = True Columns = < item Title.Caption = 'ol1' end item Title.Caption = 'col2' end item Title.Caption = 'col3' end> BorderStyle = ubsOutset TabOrder = 11 end Thanks Davie bug_Chart_Highlight.bmp Link to comment Share on other sites More sharing options...
Sherzod Posted December 7, 2020 Share Posted December 7, 2020 34 minutes ago, vbdavie said: Here's an attached screen shot of my stringgrid. The first data row(under the column headers) is always highlighted no matter where I click on the grid. Is this expected behavior? Hello, How can we reproduce this issue? Link to comment Share on other sites More sharing options...
vbdavie Posted December 7, 2020 Author Share Posted December 7, 2020 Just use my properties that I included. Copy/Paste it into any form with any theme. Run it in IDE or as an IIS server dll. They all react the same way. That first data line is in a different color. object UniStringGrid3: TUniStringGrid Left = 8 Top = 144 Width = 185 Height = 105 Hint = '' FixedCols = 0 RowCount = 3 ColCount = 3 DefaultRowHeight = 18 Options = [goVertLine, goHorzLine] ShowColumnTitles = True Columns = < item Title.Caption = 'ol1' end item Title.Caption = 'col2' end item Title.Caption = 'col3' end> BorderStyle = ubsOutset TabOrder = 11 end NOTE: I tried to look at the UniGUI demos and couldn't find any TuniStringGrid demo that had a grid with the first column NOT fixed. Davie Link to comment Share on other sites More sharing options...
Sherzod Posted December 7, 2020 Share Posted December 7, 2020 6 minutes ago, vbdavie said: Just use my properties that I included. Copy/Paste it into any form with any theme. Run it in IDE or as an IIS server dll. They all react the same way. That first data line is in a different color. Please make a simple testcase. Link to comment Share on other sites More sharing options...
vbdavie Posted December 7, 2020 Author Share Posted December 7, 2020 Here ya go. I attached a zip file for the project. When u run it, look at the grid in the upper left corner. Thanks Davie Grid_Demo.zip Link to comment Share on other sites More sharing options...
Sherzod Posted December 7, 2020 Share Posted December 7, 2020 Perhaps you mean the fixed rows? UniStringGrid.FixedRows = ? Link to comment Share on other sites More sharing options...
vbdavie Posted December 7, 2020 Author Share Posted December 7, 2020 No. Maybe I don't understand the diff between the unigui stringgrid and the VCL stringgrid. With the VCL stringgrid, I can create a list of rows with data in them AND I can create a column header with column names. And when I scroll the list, the column names don't scroll(1 fixed row). And when a row is NOT selected, the row will not have the selected color. Is this possible with unigui string grid? Davie Link to comment Share on other sites More sharing options...
peeryog Posted February 17, 2023 Share Posted February 17, 2023 It may be an old topic now but I have the exact same problem. The first non-fixed row of my UNIStringGrid is blue. Its always blue, no matter which row you select or which row your are focused on. Its such a dark blue that is difficult to read any text in that row. Its easy to reproduce. Add a UNIStringGrid. Set rowcout to anything greater than 0. Run the application. Look at the grid. This does not appear at design time , so it seems almost a theme issue. I have triton.modified as the theme but it happens with any theme, Did anyone come to a solution? Link to comment Share on other sites More sharing options...
Sherzod Posted February 18, 2023 Share Posted February 18, 2023 Hello, 8 hours ago, peeryog said: Its such a dark blue that is difficult to read any text in that row. I wouldn't say so: Also you can use this approach to change the font color: procedure TMainForm.UniStringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; var Value: string; Attribs: TUniCellAttribs); begin if ARow < (Sender as TUniStringGrid).FixedRows then Attribs.Font.Color := clWhite; end; Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now