Hi ,
My code loads a text file and dipays. Then I use a seekbar to change font size. I need the "ht" in code below to change proportionally to the change in font size. Code below. Code below does not work perfectly ht changes but not proportionally.
Sub SetText
lblText.Text = txt
ht = StrUtil.MeasureMultilineTextHeight(lblText, txt)
scvText.Panel.Height = ht
lblText.Height = ht
scvText.ScrollPosition = 0
DoEvents
End Sub
Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)
lblText.Text = SeekBar.Value
ht = StrUtil.MeasureMultilineTextHeight(lblText, txt)
ht = ht + (I need a value here to make the ht proportional increase with the font change)
scvText.Panel.Height = ht
lblText.Height = ht
End Sub
Pls any suggestions?
My code loads a text file and dipays. Then I use a seekbar to change font size. I need the "ht" in code below to change proportionally to the change in font size. Code below. Code below does not work perfectly ht changes but not proportionally.
Sub SetText
lblText.Text = txt
ht = StrUtil.MeasureMultilineTextHeight(lblText, txt)
scvText.Panel.Height = ht
lblText.Height = ht
scvText.ScrollPosition = 0
DoEvents
End Sub
Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)
lblText.Text = SeekBar.Value
ht = StrUtil.MeasureMultilineTextHeight(lblText, txt)
ht = ht + (I need a value here to make the ht proportional increase with the font change)
scvText.Panel.Height = ht
lblText.Height = ht
End Sub
Pls any suggestions?