Solved

Underline the first letter

Posted on 2001-06-18
5
338 Views
Last Modified: 2010-05-02
I have a flexgrid.
And i want to display a word in the flex that only the first letter will have an underline.
Or to mark the first letter with different color.

I will thank if anyone can have a solution for me.
0
Comment
Question by:ariell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 6201410
ariell, this is unfortunately not possible with the flexgrid. You do not have much control over individual characters within the flexgrid cells. The following code simulates the underlining of the first character of each cell in a column by setting a cellpicture to contain a single line the approximate width of the first character.

Private Sub Command1_Click()
    With Picture1
        For intRow = 1 To MSFlexGrid1.Rows - 1
            .Width = MSFlexGrid1.ColWidth(1)
            .Height = MSFlexGrid1.RowHeight(intRow) + 50
            .Cls
            .AutoRedraw = True
            MSFlexGrid1.Row = intRow
            MSFlexGrid1.Col = 1
            .BackColor = MSFlexGrid1.BackColor
            .FontSize = MSFlexGrid1.CellFontSize
            .FontName = MSFlexGrid1.CellFontName
            Picture1.Line (5, .ScaleHeight - 2)-(.TextWidth(Left(MSFlexGrid1.TextMatrix(intRow, 1), 1)), .ScaleHeight), vbBlack, BF
            Set MSFlexGrid1.CellPicture = Picture1.Image
        Next
    End With
End Sub

Private Sub Form_Load()
    With MSFlexGrid1
        For intRow = 1 To .Rows - 1
            .TextMatrix(intRow, 1) = "Hello"
            .Col = 1
            .Row = intRow
            .CellFontSize = 5 + intRow
            Me.FontSize = .CellFontSize
            .RowHeight(intRow) = Me.TextHeight(.TextMatrix(intRow, 1))
            .ColWidth(1) = Me.TextWidth(.TextMatrix(intRow, 1))
        Next
    End With
End Sub
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 100 total points
ID: 7136225
Hi ariell,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept TimCottee's comment(s) as an answer.

ariell, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Author Comment

by:ariell
ID: 7136920
It was an old question, i forgot about it.
Thank for your reminder.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7137023
ariell,
Too late now, but in the future, please accept one of the comments made by one of the Experts who helped you (not me). Thanks! --Dan
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7138233
TimCottee

I will post a separate question for you in his TA.

** Mindphaser - Community Support Moderator **
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 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