该问题来自社区帖: https://bbs.csdn.net/topics/616452848.为符合问答规范, 该问题经过ChatGPT优化
if key =#32 then
DBGrid1.Columns[3].Visible:=False;
How can I hide a specific column when pressing the space key? But if I rearrange the table order, the column that is hidden is not the one I want. How can I hide a specific fixed column when pressing the space key, for example, hiding the "Contact Phone" column?