사이드바 영역으로 건너뛰기

TMS TAdvStringGrid

TAdvStringGrid : Frequently asked questions

Q1: When I try to install the package, it asks for AdvGrid.pas
package 를 인스톨할 때 AdvGrid.pas를 물어봅니다.

A1: Make sure the correct version of ADVGRID.DCU and other DCU files are in your library path, that your library path contains the directory where ADVGRID.DCU is installed and that no other versions of ADVGRID.DCU are in your library path. Note that the binary version of TAdvStringGrid cannot be used with Delphi or C++Builder trial versions.

당신이  library path 에 정확한 버전의 ADVGRID.DCU 와 다른 DCU 파일들이 있는지 확인해봅니다.


--------------------------------------------------------------------------------

Q2: When I run my application I get an error "property does not exist"

A2: An older version of ADVGRID.DCU might be in your library path. When upgrading from an older version, make sure to first open all forms in your application that use the grid, ignore property errors on opening, save form files and then rebuild your application.


--------------------------------------------------------------------------------

Q3: When try to install TAdvStringGrid, I get an error that TAdvStringGrid is compiled with a different version of PictureContainer

A3: Most likely another TMS component has been installed that is also using the PictureContainer. Due to strict binary compatibility checks of Delphi & C++Builder, it is causing problems to install multiple binary distributed components that share a unit. For using the binary versions, the only workaround is to install the packages alternatingly for evaluation. Registered versions that come with full source do not have this problem.


--------------------------------------------------------------------------------

Q4: I use OnGetEditorType to specify a checkbox but it only displays when editing

A4: Use a permanently visible checkbox that can be added with the AddCheckBox method


--------------------------------------------------------------------------------

Q5: I use row selection, but the first column has a different color

A5: Set goDrawFocusSelected = true in the Options property


--------------------------------------------------------------------------------

Q6: Why do rotated fonts do not print correct ?

A6: Toggle the value of the public property PrinterDriverFix: Boolean


--------------------------------------------------------------------------------

Q7: I want to use rotated font but the font does not show rotated

A7: Make sure to use a truetype font. Only truetype font can be rotated.


--------------------------------------------------------------------------------

Q8: Why do my printouts do not have colors or fonts set as displayed ?

A8: Assign the OnGetCellColor event to the OnGetCellPrintColor event as well.


--------------------------------------------------------------------------------

Q9: Copy and paste does not seem to work ?

A9: Make sure that Navigation.AllowClipboardShortCuts is true and the grid is either editable or Navigation.AllowClipboardAlways is true


--------------------------------------------------------------------------------

Q10: I want to select multiple rows with Ctrl - mouseclick and Shift - mouse click

A10: In the Options property set goRowSelect = true and set MouseActions.DisjunctRowSelect = true. The desired selection capabilities are enabled now.


--------------------------------------------------------------------------------

Q11: How can the copyright notice be removed from the grid ?

A11: The registered version of TAdvStringGrid does not show this copyright notice


--------------------------------------------------------------------------------

Q12: I am not sure if the latest version of TAdvStringGrid is installed. How can I check this ?

A12: At design time, right click on the grid and select About. At runtime, show the version with : ShowMessage(Grid.GetVersionString);


--------------------------------------------------------------------------------

Q13: When I try to install the trial version of TAdvStringGrid in the Delphi 6 or Delphi 7 trial version, it asks for ADVGRID.PAS ?

A13: The Delphi 6 or Delphi 7 trial edition does not allow to install binary component distributions. The registered source version of TAdvStringGrid will work with the Delphi 6 or Delphi 7 trial edition


--------------------------------------------------------------------------------

Q14: With the registered version of TAdvStringGrid, do we need to pay additional royalties for application distribution ?

A14: With license for commercial use of the registered version, no additional royalties need to be paid


--------------------------------------------------------------------------------

Q15: How can I set text in a cell ?  How do I programmatically change a column width or row height ?

A15: Setting text in a cell is done with the grid.Cells[col,row]: string propert. Setting the column width is done with grid.ColWidths[col]: Integer and setting a row height with grid.RowHeights[row]: Integer.  Note that TAdvStringGrid inherits ALL methods and properties of TStringGrid. As such, refer to the Borland documentation for TStringGrid for help on the basic grid functions


--------------------------------------------------------------------------------

Q16: How can I get the state of a checkbox added with grid.AddCheckBox ?

A16:

var
 state: Boolean;

grid.GetCheckBoxState(col,row,state);
if state then ShowMessage('CheckBox is checked') else ShowMessage('CheckBox is not checked');


--------------------------------------------------------------------------------

Q17: I get an exception 'invalid column' during export to Excel

A17: The maximum number of columns supported in Excel itself is 255. As such, it is not possible to export more columns than the Excel limit.


--------------------------------------------------------------------------------

Q18: I have added a button on the grid with AddButton but the OnButtonClick event is not triggered ?

A18: If you add a button to a non editable cell (or grid without editing enabled) the button is treated as disabled by default. To override this behaviour, set grid.ControlLook.NoDisabledButtonLook = true


--------------------------------------------------------------------------------

Q19: I try to set VAlignment to vtaCenter or vtaBottom but this is not working

A19: By default, wordwrap is enabled in the grid and it is a limitation of the Microsoft text drawing API's that wordwrapped text is always top aligned. To use the VAlignment capability, set WordWrap = false


--------------------------------------------------------------------------------

Q20: Can I load a gallery file programmatically at runtime ?

A20: Yes, call grid.LoadVisualProps(GalleryFileName);


--------------------------------------------------------------------------------

Q21: I am having problems with grid.SortByColumn, it is slow or behaves incorrect

A21: SortByColumn is a deprecated method, use grid.QSort instead with settings as defined under grid.SortSettings


--------------------------------------------------------------------------------

Q22: Users of older operating systems have an error message on application startup related to a missing gdiplus.dll

A22: Either redistribute the Microsoft GDIPLUS.DLL (explained in README.TXT) or remove the gdiplus.dll dependency by commenting the line {$DEFINE TMSGDIPLUS} in TMSDEFS.INC


--------------------------------------------------------------------------------

Q23: When exporting to Excel file with the method grid.SaveToXLS()  I get the error : "Excel OLE server not found"

A23: The method grid.SaveToXLS() uses OLE automation to export to Excel file and thus requires Excel to be installed on the machine. To avoid this requirement, you can use the component TAdvGridExcelIO to export to Excel.

진보블로그 공감 버튼트위터로 리트윗하기페이스북에 공유하기딜리셔스에 북마크