[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Text in top row of FlexGrid?

Posted on 2002-03-18
4
Medium Priority
?
298 Views
Last Modified: 2009-07-29
How do you put text in the top rows of a MSFlexGrid? I can put stuff in all the grids, but not the top row. I am using VB6.
0
Comment
Question by:vmaxx
4 Comments
 
LVL 54

Accepted Solution

by:
Ryan Chong earned 150 total points
ID: 6876358
What do you mean by Not the Top Row?

MSFlexGrid1.TextMatrix(0, 1) = "Hello World!" ?

0
 
LVL 18

Expert Comment

by:mdougan
ID: 6876791
There are two ways of putting text in the top row of the flexgrid.  First, is using TextTatrix with a row index of zero like ryancys has suggested.  You can also use the FormatString property:

tblCustomers.FormatString = "CustNo|Cust Name|Balance"

You'd have to look at the colseparators (?) property.  I think that the pipe symbol separates the columns, but it could be a vbTab character.  You can also include special characters that tell the grid whether to right-align, center or left-align the column:

tblCustomers.FormatString = "^CustNo|<Cust Name|>Balance"
0
 
LVL 1

Expert Comment

by:Barraza
ID: 6878885
I had the same problem.  This is how I added the first row and then removed the top "blank" row.

FlexGrid1.AddItem "Column1" & vbTab & "Column2" & vbTab & "Column3"

If FlexGrid1.TextMatrix(1, 1) = "" Then FlexGrid1.RemoveItem (1)


0
 
LVL 1

Author Comment

by:vmaxx
ID: 6879265
Thats it, I can't tell you how long I went through the help files looking for that simple command.

thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question