How to input and query data in mshflexgrid Table format in VB language
Xiaobian today takes you to understand how to carry out mshflexgrid tabular data entry and query in VB language. The knowledge points introduced in this article are very detailed. Friends who feel helpful can browse the content of the article together with Xiaobian, hoping to help more friends who want to solve this problem find the answer to the question. Let's learn the knowledge of "how to carry out mshflexgrid tabular data entry and query in VB language" together with Xiaobian.
mshflexgrid tabular data entry and query
What is Mshflexgrid?
How to add an item to mshflexgrid?
Using the additem method
Example: MSHFlexGrid1.AddItem value
If you want to add data to different columns, you need to use vbtab.
How to set header?
MSHFlexGrid1.TextMatrix(row index, column index), note that both row index and column index start at 0.
Examples:
MSHFlexGrid1.TextMatrix(0, 0)="User Name"
MSHFlexGrid1.TextMatrix(0, 1) = "Password"
MSHFlexGrid1.TextMatrix(0, 2) = "Remarks"
1, additem method adds data, vbtab is used to change a column
2. textMatrix Settings Header
Interface:
Source Code:
Option Explicit
Private Sub Command1_Click()MSHFlexGrid1.TextMatrix(0, 0) = "User Name"MSHFlexGrid1.TextMatrix(0, 1) = "Password"MSHFlexGrid1.TextMatrix(0, 2) = "Remarks"MSHFlexGrid1.AddItem Text1.Text & vbTab & Text2.Text _& vbTab & "wq"
End Sub
Thank you for reading, the above is "VB language how to mshflexgrid tabular data entry and query" all the content, learn friends to quickly operate it. I believe that Xiaobian will definitely bring you better quality articles. Thank you for your support of the website!