Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox trouble
Message
From
28/10/2005 16:18:27
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
 
 
To
28/10/2005 12:52:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01062901
Message ID:
01063136
Views:
10
Yes, but than user cannot enter value with keyboard (I don't talk about a small list which can select only one keystroke). In that case already not needed an inputmask.

Thank you,

>Changing the Style to 2 - Dropdown List seems to work:
>
>oform = CREATEOBJECT('testform')
>oform.show
>READ EVENTS
>
>DEFINE CLASS testform AS form
>
>
>   Height = 250
>   Width = 493
>   DoCreate = .T.
>   Name = "TestForm"
>   Caption = 'Test Form'
>   DIMENSION myarray[5]
>
>
>   ADD OBJECT combo1 AS combobox WITH ;
>      MaxLength = 3, ;
>      RowSourceType = 5, ;
>      RowSource = "thisform.myarray", ;
>      Height = 24, ;
>      Left = 48, ;
>      Style = 2, ;
>      Top = 16, ;
>      Width = 100, ;
>      Format = "", ;
>      BoundTo = .T., ;
>      Themes = .T., ;
>      Name = "Combo1"
>
>
>   ADD OBJECT text1 AS textbox WITH ;
>      Height = 23, ;
>      Left = 168, ;
>      ReadOnly = .T., ;
>      TabStop = .F., ;
>      Top = 16, ;
>      Width = 100, ;
>      Name = "Text1"
>
>
>   ADD OBJECT text2 AS textbox WITH ;
>      Height = 23, ;
>      Left = 288, ;
>      ReadOnly = .T., ;
>      TabStop = .F., ;
>      Top = 16, ;
>      Width = 100, ;
>      Name = "Text2"
>
>
>   ADD OBJECT list1 AS listbox WITH ;
>      RowSourceType = 5, ;
>      RowSource = "thisform.myarray", ;
>      Height = 156, ;
>      Left = 48, ;
>      SpecialEffect = 0, ;
>      Top = 67, ;
>      Width = 100, ;
>      BoundTo = .T., ;
>      Themes = .T., ;
>      Name = "List1"
>
>
>   ADD OBJECT text3 AS textbox WITH ;
>      Height = 23, ;
>      Left = 168, ;
>      ReadOnly = .T., ;
>      TabStop = .F., ;
>      Top = 67, ;
>      Width = 100, ;
>      Name = "Text3"
>
>
>   ADD OBJECT text4 AS textbox WITH ;
>      Height = 23, ;
>      Left = 288, ;
>      ReadOnly = .T., ;
>      TabStop = .F., ;
>      Top = 67, ;
>      Width = 100, ;
>      Name = "Text4"
>
>
>   ADD OBJECT label1 AS label WITH ;
>      BackStyle = 0, ;
>      Caption = "Value", ;
>      Height = 17, ;
>      Left = 168, ;
>      Top = 52, ;
>      Width = 40, ;
>      Name = "Label1"
>
>
>   ADD OBJECT label2 AS label WITH ;
>      BackStyle = 0, ;
>      Caption = "Value", ;
>      Height = 17, ;
>      Left = 168, ;
>      Top = 0, ;
>      Width = 40, ;
>      Name = "Label2"
>
>
>   ADD OBJECT label3 AS label WITH ;
>      BackStyle = 0, ;
>      Caption = "Display Value", ;
>      Height = 17, ;
>      Left = 288, ;
>      Top = 0, ;
>      Width = 96, ;
>      Name = "Label3"
>
>
>   ADD OBJECT label4 AS label WITH ;
>      BackStyle = 0, ;
>      Caption = "Display Value", ;
>      Height = 17, ;
>      Left = 288, ;
>      Top = 52, ;
>      Width = 96, ;
>      Name = "Label4"
>
>
>   PROCEDURE Init
>      DODEFAULT()
>      dimension thisform.myarray(5)
>      thisform.myarray(1) = 1
>      thisform.myarray(2) = 10
>      thisform.myarray(3) = 100
>      thisform.myarray(4) = 298
>      thisform.myarray(5) = 999
>      thisform.combo1.listindex = 1
>      thisform.list1.listindex = 1
>      thisform.text1.value = thisform.combo1.value
>      thisform.text2.value = thisform.combo1.displayvalue
>      thisform.text3.value = thisform.list1.value
>      thisform.text4.value = thisform.list1.displayvalue
>      thisform.refresh()
>   ENDPROC
>
>
>   PROCEDURE combo1.Click
>      DODEFAULT()
>      thisform.text1.value = thisform.combo1.value
>      thisform.text2.value = thisform.combo1.displayvalue
>      thisform.refresh()
>   ENDPROC
>
>
>   PROCEDURE list1.Click
>      thisform.text3.value = thisform.list1.value
>      thisform.text4.value = thisform.list1.displayvalue
>      thisform.refresh()
>   ENDPROC
>
>
>   PROCEDURE DESTROY
>      CLEAR EVENTS
>   ENDPROC
>
>ENDDEFINE
>
>
>>I have a combobox. If I put a inputmax ( 999 ) to it, when select a value from list it doesn't appear on comboboxes text portion. But actually that value is attached. If I select value from keyboard or I remove inputmax value is displayed. I'm angry with that. I cannot found a solution... :(
>>
>>Update: I tried inputmask 999999999999 and value can display. Why? I don't want to any input more than 999
Previous
Reply
Map
View

Click here to load this message in the networking platform