Justify long word txt in a cell of msflexgrid

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

Justify long word txt in a cell of msflexgrid

Post by sal21 »

I need to maintain the fixed with of column, but justify a big word txt in a cell of msflexgrid.
possible?

note:
the possible big is in column 2 and in column 3

User avatar
SpeakEasy
4StarLounger
Posts: 536
Joined: 27 Jun 2021, 10:46

Re: Justify long word txt in a cell of msflexgrid

Post by SpeakEasy »

Well, assumuing I understand you correctly - sort of.

The MSFlexGrid has a (global) WordWrap property that can be set. But it is far from intelligent, lacking a hyphenation dictionary, and only creates a linebreak on whitespace, and does not automatically adjust the height of a row.

You might be better off, if your goal is to allow user to see entire text in a specic cell, to populate the ToolTiptext with the contents of the cell, e.g

Code: Select all

Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    MSFlexGrid1.ToolTipText = MSFlexGrid1.TextMatrix(MSFlexGrid1.MouseRow, MSFlexGrid1.MouseCol)
End Sub

User avatar
SpeakEasy
4StarLounger
Posts: 536
Joined: 27 Jun 2021, 10:46

Re: Justify long word txt in a cell of msflexgrid

Post by SpeakEasy »

DId you resolve this?

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

Re: Justify long word txt in a cell of msflexgrid

Post by sal21 »

SpeakEasy wrote:
09 Apr 2023, 18:57
DId you resolve this?
Hi bro tks, yes resolved!
But sorry for delay, but seriuos problem with my new home!