Jump to content


Vladimir

Member Since 21 May 2009
Offline Last Active Apr 12 2010 06:13 AM
-----

Topics I've Started

Problem with ItemValue in NxComboBoxItem

21 May 2009 - 09:27 AM

Sorry for my english, I'm from Russia rolleyes.gif

I try to execute the procedure:
CODE
void __fastcall TAdmining::NxComboBoxItem1CloseUp(TNxPropertyItem *Sender)
{
String s = ((TNxComboBoxItem*)NxInsp->Items->Item[1])->ItemValue;
ShowMessage("((TNxComboBoxItem*)NxInsp->Items->Item[1])->ItemValue="+s);
}

The result is a string starting from the second character. For example, it was selected "qwerty", the result will be "werty"
I think that does not properly function: TNxComboBoxItem.GetValueFromIndex (), may be I am wrong ...

Help me, please!

P.S.:
Properties for TNextInspector:
CODE
object NxInsp: TNextInspector
Left = 0
Top = 0
Width = 321
Height = 491
Align = alClient
Style = psOffice2007
TabOrder = 0
object NxTextItem1: TNxTextItem
Caption = 'TextItem'
Color = clWindow
ReadOnly = True
ParentIndex = -1
object NxComboBoxItem1: TNxComboBoxItem
Color = clWindow
OnCloseUp = NxComboBoxItem1CloseUp
Lines.Strings = (
'qwerty'
'asdfgh'
'zxcvbn')
ParentIndex = 0
end
end
end