Mercurial > projects > dwt-win
changeset 85:a155324d7a44
make table text visible
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 06 Feb 2008 19:33:24 +0100 |
parents | 00a333240696 |
children | bef1ed4ebc50 |
files | dwt/widgets/Table.d dwt/widgets/TableItem.d |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/widgets/Table.d Wed Feb 06 18:46:23 2008 +0100 +++ b/dwt/widgets/Table.d Wed Feb 06 19:33:24 2008 +0100 @@ -5976,7 +5976,7 @@ string.getChars (0, length_, buffer, 0); buffer [length_++] = 0; static if (OS.IsUnicode) { - OS.MoveMemory (plvfi.item.pszText, buffer.ptr, length_ * 2); + OS.MoveMemory (plvfi.item.pszText, StrToTCHARz( buffer[0..length_] ), length_ * 2); } else { OS.WideCharToMultiByte (getCodePage (), 0, buffer.ptr, length_, plvfi.item.pszText, plvfi.item.cchTextMax, null, null); byte dummy;
--- a/dwt/widgets/TableItem.d Wed Feb 06 18:46:23 2008 +0100 +++ b/dwt/widgets/TableItem.d Wed Feb 06 19:33:24 2008 +0100 @@ -1194,17 +1194,17 @@ if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if (index is 0) { if (string ==/*eq*/text) return; - super.setText (string); + super.setText (string.dup); } int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return; if (strings is null && index !is 0) { - strings = new char[] [count]; + strings = new char[][] (count); strings [0] = text; } if (strings !is null) { if (string==/*eq*/strings [index]) return; - strings [index] = string; + strings [index] = string.dup; } if ((parent.style & DWT.VIRTUAL) !is 0) cached = true; if (index is 0) {