Forum > Carbon
(SOLVED) Merge cells example bug?!
xinyiman:
Hi guys, I wanted to report a non-working example released with lazarus. This is the example to merge cells in TStringGrid. I have also attached the example, but if you compile and run mac (carbon) and double-click on a blank cell, it generates an exception in the DoEditorShow procedure. Does anyone know how to solve?
wp:
I am the author of this example, but don't have access to Mac/carbon, and thus cannot reproduce on Win.
Double-click behavior of the standard grid was not modified in this example. Does the bug also occur with a standard string grid? There is a comment in TCustomGrid.DoEditorShow regarding carbon, but it has been there since at least version 1.6.4.
What exactly is the error message? Can you provide a stack trace?
xinyiman:
See if the images are clear enough.
xinyiman:
Other
wp:
Probably there is no editor. Modify TmcGrid.DoEditorShow like this and try again:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TMCStringGrid.DoEditorShow;var R: TRect;begin inherited; if goColSpanning in Options then begin CalcCellExtent(Col, Row, R); if Assigned(Editor) then // <--- NEW Editor.SetBounds(R.Left, R.Top, R.Right-R.Left-1, R.Bottom-R.Top-1); end;end;
Navigation
[0] Message Index
[#] Next page