Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Changing text style in MSFlexgrid

Posted on 2003-03-27
3
Medium Priority
?
399 Views
Last Modified: 2013-12-26
Hey,
I am using MSFlexGrid to display information taken from a text file.
If the value of that text is X I want to display it in italic, if it isn't I want it to be printed normally.It works for the first value but for no other-even though the value of MSFlexGrid1.CellFontItalic is true for the correct values(I have checked with a print to a textbox)

Any ideas?
The code I am using is below.

For Count = 1 To Count1
            If (Ti(Count).Summary = "Yes") Then
                MSFlexGrid1.CellFontItalic = True
                MSFlexGrid1.TextMatrix(Ti(Count).Line_number, 1) = Ti(Count).Taskname

           
            Else
                MSFlexGrid1.CellFontItalic = False
                MSFlexGrid1.TextMatrix(Ti(Count).Line_number, 1) = Ti(Count).Taskname
            End If
Next Count
0
Comment
Question by:eoinb
3 Comments
 
LVL 3

Expert Comment

by:y2ksw
ID: 8218271
You must point to the cell by Row and Col Properties before setting other Cell Styles.
0
 
LVL 11

Accepted Solution

by:
supunr earned 100 total points
ID: 8221475
For Count = 1 To Count1
           MSFlexGrid1.Row = Ti(Count).Line_number
           MSFlexGrid1.Col = 1
           If (Ti(Count).Summary = "Yes") Then
               MSFlexGrid1.CellFontItalic = True
               MSFlexGrid1.TextMatrix(Ti(Count).Line_number, 1) = Ti(Count).Taskname

           Else
               MSFlexGrid1.CellFontItalic = False
               MSFlexGrid1.TextMatrix(Ti(Count).Line_number, 1) = Ti(Count).Taskname
           End If
Next Count

' Good luck!
0
 

Author Comment

by:eoinb
ID: 8223741
Thanks supunr, it was such a small problem and it has been bugging me for days...but then again they always are ;)

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

572 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