dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: FlexGrid

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    FlexGrid

    [Originally posted by Tom McGeehan]

    Hello,

    I am using a vsFlexGrid control in a VB 6.0 project.
    Some of the text I'm displaying in the cells could have a return character(s). How do I account for this?
    Specifically, how do I adjust the row height and ensure that all line breaks are accurately shown?

    thanks,
    Tom

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:FlexGrid

    [Originally posted by allen]

    You could try something like this. It doesn't work perfectly, but it might point you in the right direction. You'll need to set the wordwrap property of the fg to true as well as the multiline property of the text control.

    Private Sub Text1_Change()
    Dim th As Long, tw As Long
    tw = Me.TextWidth(Text1.Text)
    th = Me.TextHeight(Text1.Text)
    If fg1.RowHeight(3) < th Then fg1.RowHeight(3) = th
    If fg1.ColWidth(3) < tw Then fg1.ColWidth(3) = tw
    fg1.TextMatrix(3, 3) = Text1.Text
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center