C++生成器TstringGrid从特定单元格获取字符串
C++ builder TstringGrid get string from specific cell
大家好,我有 C++ tStringGrid
我想从带有坐标的特定单元格中获取字符串
我试过这个但没有运气:
UnicodeString cell_obj = StringGrid1->Objects[3][2]->ToString();
错误:
Access violation at address 00407617 in module 'NGG_Client.exe'. Read of address 00000000.
请帮忙。
我没有一个可以构建它的工作开发环境,但请尝试:
assert( StringGrid1->ColCount > 3 && StringGrid1->RowCount > 2 );
UnicodeString cell_str = StringGrid1->Cells[3][2];
这可能是一个AnsiString
而不是一个UnicodeString
。
相关文章:
- 将QIcon添加到QTableView单元格
- 当用户在qtablewidget中输入单元格时,如何获得信号?C++
- 查找矩阵中单元格的相邻元素
- C++:在多个线程中访问同一数组/向量的不同单元格是否会产生数据竞赛?
- 当我使用需要计算数组单元格地址的模板时,奇怪的C++行为
- PyQT - 在 QTableWidget 单元格中显示垂直文本
- 2D 数组,某些单元格保存特定数据
- 为什么通过定义另一个指针单元格,整个代码停止工作?
- CLI/C++dataGridView示例-设置comobox单元格列表的索引
- 用单元格表示迷宫
- 为什么不能使用 setData() 在 QTreeView 中设置单元格的背景颜色?
- 将 GtkTreeView 中的单元格设置为以编程方式编辑模式
- 如何防止Qt中的当前单元格更改信号或跳过"processing"?
- 如何在具有Voro 库的容器中获取所有单元格的顶点
- Qt表查看单元格中的显示图像并在单击时获取路径
- C++生成器TstringGrid从特定单元格获取字符串
- Qt C++ 从 QTableView 中获取所选行的每个单元格的数据
- 如何在c++中获取Excel单元格值
- 在QTableWidget中获取QCheckBox的单元格位置
- 获取excel单元格的像素大小