Jump to content

Search the Community

Showing results for tags 'stringgrid'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 5 results

  1. Using a string grid, (but I may also use a dbgrid later) how do I get the *column* number when I right-click on a column ? I've searched around but could not find the answers. Below, shows column 2 was right-click-selected. The purpose of this is to allow me to right-click on a column and a pop-up menu with options for (copy_column, create_table) will show. 1. I want to copy the text of the column to the clipboard. 2. or, create a table out of the selected column's text. (I know how to do these parts.) TIA
  2. I have an FMX project with a StringGrid. I added a TPopupColumn to the StringGrid and added two items in the list. The only way I have found to invoke the TPopupColumn and get to those values is by using the mouse. Is there a way to invoke the TPopupColumn values by using the keyboard. SOLVED: Tab into the column and use the spacebar. HT to Tom Brunberg https://stackoverflow.com/users/2292722/tom-brunberg
  3. Hey guys, so for this program I'm writing I want to check a string grid for empty rows/rows with just spaces in them and then subsequently deleting them to clean the grids up a bit. I made a procedure that reads the fields from a specific table in a DB and into a corresponding string grid. While 13 of the 14 grids I have, read the records like they're supposed to from the DB, one single table doesn't read correctly, it reads the same amount of records again as empty rows when displayed on the grid. For example, let's say I have 3 records in the table in the DB and I read it into the grid, the records display properly but then they add 3 more rows with just spaces in them. My code for this so far: procedure TfrmPuntehou.IncreaseRowCount(grid: TStringGrid); begin //increases rows in grid grid.RowCount:= grid.RowCount+1; end; procedure TfrmPuntehou.WriteToList(tbl: TADOTable;grid:TStringGrid); var Row: Integer; i: Integer; begin tbl.Active:= True; Row := 1; // Populate cells Tbl.First; while not (Tbl.Eof) do begin grid.Cells[0,Row]:= IntToStr(Row); grid.Cells[1,Row]:= tbl.fields[0].AsString; grid.Cells[2,Row]:= tbl.fields[1].AsString; grid.Cells[3,Row]:= tbl.fields[2].AsString; Inc(Row); IncreaseRowCount(grid); Tbl.Next; end; tbl.Active:=false; //what I'm planning to do to alleviate this but I'm not sure to use in the conditions of the if // because if I say grid.Rows[i] = ''/grid.Rows[i] = ' ' then I get an error // for i := 1 to grid.RowCount - 1 do // begin // if () OR () then // begin // grid.Rows[i].Delete; // end; // end; end; Illustration of what I'm talking about: What is supposed to happen: What's happening (the records are inserted correctly, but there are unnecessary rows here for only 3 records. When exported to a CSV the empty rows are filled with spaces"): Thanks in advance for any help on this! Kind Regards PrimeMinister
  4. bazzer747

    StringGrid Align Vertically

    Hi I have a stringgrid which has a height of about twice the height of the text that is entered in it (the right side in the attached). I think the display would look much better if I could align this text vertically in the centre, rather than at the top of the cell. I've tried to figure out if there is a setting somewhere but can't find one (if one exists). Any help would be appreciated.
  5. JDS2018

    Add test to Stringgrid

    Hi can you some one help me on below i have edit1, edit2 edit3, edit4 i need to add add text from edit boxs to string grid when i click add Button , i am using multi device Windows application for Windows , on Delphi 10.3
×