on 08-07-2005 5:18 PM
In vb, I can read/write everything but not in Delphi...
oForm := SBOapp.Forms.ActiveForm;
clsMatrix := SAPbouiCOM.Matrix(oForm.Items.Item('38').Specific);
clsMatrix.Columns.Item('U_freerm').Cells.Item('1').Specific.Value := '1'; I have tried .Value but the error message send that no the property ".Value" (it works in VB) Tried clsMatrix := oForm.Items.Item('38').Specific; (works in VB but not in delphi) Tried i := 1; clsMatrix.Columns.Item('U_freerm').Cells.Item('1').Specific := TObject(i); (delphi said that, .Specific is readonly)
Welcome for any hint or suggestion, thx.
I don't know why but it works:
oEdit := clsMatrix.Columns.Item('U_freerm').Cells.Item(TObject(pVal.Row)).Specific as SAPbouiCOM.EditText;
or
oEdit := clsMatrix.Columns.Item('U_freerm').Cells.Item(TObject(StrToInt('1'))).Specific as SAPbouiCOM.EditText;
-
The following doesn't work:
oEdit := clsMatrix.Columns.Item('U_freerm').Cells.Item(TObject(1)).Specific as SAPbouiCOM.EditText;
or
oEdit := clsMatrix.Columns.Item('U_freerm').Cells.Item(TObject('1')).Specific as SAPbouiCOM.EditText;
or
oEdit := clsMatrix.Columns.Item('U_freerm').Cells.Item(TObject(IntToStr(pVal.Row))).Specific as SAPbouiCOM.EditText;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this line:
(if your matrix field is an Edit field)
(clsMatrix.Columns.Item('U_freerm').Cells.Item(TObject('1')).Specific as SAPbouiCOM.EditText).Value:= '1';
or
(clsMatrix.Columns.Item('U_freerm').Cells.Item('1').Specific as SAPbouiCOM.EditText).Value:= '1';
or
(if your matrix field is a Combobox field)
(clsMatrix.Columns.Item('U_freerm').Cells.Item('1').Specific as SAPbouiCOM.Combobox).Selected.Value
Have fun,
Peter
p.s.
There are no automatic type conversions in Delphi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(clsMatrix.Columns.Item('U_freerm').Cells.Item(TObject('1')).Specific as SAPbouiCOM.EditText).Value:= '1';
and
(clsMatrix.Columns.Item('U_freerm').Cells.Item('1').Specific as SAPbouiCOM.EditText).Value:= '1';
all failed, without any error message. Really strange...
But ok for the textbox, only fail inside the matrix...
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.