Results 1 to 2 of 2

Thread: Two font style in one TableCell

  1. #1

    Thread Starter
    Addicted Member scsfdev's Avatar
    Join Date
    Feb 2008
    Location
    Singapore
    Posts
    224

    Two font style in one TableCell

    Hi all,
    Want to know how to make two font style in one cell?
    My code is in asp.net code behind not CSS.

    I have a coding like this:
    ASP.NET Code:
    1. Dim tblMain As new Table
    2. tblMain.ID = "tblMain"
    3. tblMain.EnableViewState = True
    4. tblMain.CellPadding = 0
    5. tblMain.CellSpacing = 0
    6. tblMain.BorderWidth = Unit.Point(0)
    7.  
    8. Dim dRow As TableRow
    9. Dim dCell As TableCell
    10.  
    11. dRow = New TableRow
    12. dCell = New TableCell
    13. dCell.BackColor = System.Drawing.Color.Lavender
    14. dCell.Text = "Customer Name"
    15. dRow.Cells.Add(dCell)

    What I want here is I want to add "Triangle" at the end of "Customer Name" text. And for this triangle, I must use "Wingdings 3" font with character "p".
    but "Customer Name" is in Tahoma font.

    Can I add like this? or simply I just can't do like that?
    I'm using VS 2005 & 2008 & 2010 with SQL Server 2005 Express.

    My hobby beside programming: http://dslrstranger.wordpress.com

  2. #2
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Two font style in one TableCell

    You can add 2 labels (or maybe span tags) in the cell that you have created. Place "Customer Name" in the first label, apply relevant style to it. Next, add "p" to second label, apply relevant style to it. Then place both the labels to the cell.
    Show Appreciation. Rate Posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width