Page 1 of 1

Row height increased when adding text to a table

Posted: Mon Nov 28, 2016 10:11 pm
by DXS
Hello again :)

We have an issue that I see occurs on your RichViewActionsTest as-is.

to duplicate:
ScaleRichView, start with blank doc.
Add a table (I give it 6 columns and 7 rows).
Go to table properties
Set Cell spacing...
uncheck Between cells
set Between table border and cells
Horizontal=0
Vertical=0
OK
Set Table border...
select None
OK
OK.

Now, edit that table: go to bottom row, left to right, just add an X or anything to a bottom cell, then left click on that same cell.
It is not consistent on my app, but it see it happen on your RVAT each time - the bottom row will increase dramatically (just the once afaict)

Is there a reason for this / and more to the point, any way to correct this
behavior?

Thank you,
Andy

Posted: Tue Nov 29, 2016 6:32 am
by Sergey Tkachenko
It's very hard to reproduce... It looks like it happened once, but no matter how many times I tried, it does not happen again. I'll try to fix, but it's hard without reproducing.
What version of TRichView and ScaleRichView do you use?

Posted: Tue Nov 29, 2016 3:44 pm
by DXS
I'm using TRV v16.10.1 (2016-Nov-1)
and I'm not sure about the ScaleRichView - I did the install a few weeks ago and let the installer download the latest.

Also, Delphi10(seattle) + Win10pro

hth &

Thank you,
Andy

Posted: Mon Dec 05, 2016 8:10 pm
by DXS
Hi Sergey,

I was curious if you were able to make any progress on this issue?
I (too) see it as very random, but it does keep happening.

Thanks,
Andy

Posted: Wed Dec 07, 2016 10:59 am
by Sergey Tkachenko
Not yet, but I did not concentrate on this problem yet.
I'll try to solve it in the next couple of days, but it's not simple, because it's very hard to reproduce it.

Posted: Thu Dec 08, 2016 11:55 am
by Sergey Tkachenko
Can you help me?
Compile your application with the compiler settings:
- optimization off
- stack frames on
Set a breakpoint in TRVTableCellData.SetBestHeight (RVTable unit).
I believe when the row height is increased, this method is executed.
When it happens, please open a call stack window (View | Debug Windows | Call Stack), select all (Ctrl+A), copy (Ctrl+C) and send it to me or post here.

Posted: Thu Dec 08, 2016 8:12 pm
by DXS
Happy to: Just as you said :)

RVTable.TRVTableCellData.SetBestHeight(103)
:00490058 SetOrdProp + $3C
RVTable.TRVTableItemInfo.SetCellIntProperty(0,'BestHeight',103,6,0,True,False)
RVTable.TRVTableItemInfo.SetCellBestHeight_(-1,103,6,0)
RVTable.TRVTableItemInfo.SetCellBestHeight(103,6,0)
RVTable.SetHeight(6,103,212)
RVTable.TRVTableItemInfo.ResizeRow(6,108)
SclRView.TSRichViewEdit.ResizeTable([])
SclRView.MouseUpResize
SclRView.TSRichViewEdit.MouseUp(mbLeft,[],681,233)
:0055009d TControl.DoMouseUp + $3D
:00554236 TWinControl.WndProc + $5EE
SclRView.TSRichViewEdit.WndProc((514, 0, 15270569, 0, 0, 0, (), 681, 233, (), 0, 0, ()))
:00553853 TWinControl.MainWndProc + $2F
:004d22ca StdWndProc + $16
:74b484f3 user32.SetManipulationInputTarget + 0x53
:74b26c40 ; C:\WINDOWS\SysWOW64\user32.dll
:74b26541 ; C:\WINDOWS\SysWOW64\user32.dll
:74b26300 user32.DispatchMessageW + 0x10