**** start of form Properties******* Height = 220 Width = 202 ShowWindow = 0 DoCreate = .T. Caption = "Get State" Closable = .T. TitleBar = 0 thisstate = Name = "getstateform" SA_label1.Visible = .F. SA_label1.Name = "SA_label1" ****** End of Form Properties ****** Start of Listbox Properties ColumnCount = (ALEN(laMyStates,2)) ColumnWidths = "45,110" RowSourceType = 5 RowSource = "laMyStates" ControlSource = "thisform.thisstate" FirstElement = 1 Height = 174 Left = 6 NumberOfElements = (ALEN(laMyStates)) Top = 18 Width = 189 BoundTo = .T. Name = "sa_list1" ****** End of Listbox Propertiesand the methods were straight forward as well
** form's Init method PROCEDURE Init SELECT CODE,CODEDESC FROM USERCODE ; INTO ARRAY laMyStates ; WHERE CODETYPE = 'STATE' ; ORDER BY code ENDPROC **** Listbox methods PROCEDURE DblClick this.Parent.thisstate = this.Value thisform.Hide() ENDPROC PROCEDURE InteractiveChange WAIT WINDOW 'This state is: ' + this.Value nowait ENDPROCIn the button that calls it I have:
PROCEDURE Click oMyState = CREATEOBJECT('getstateform') oMystate.show() lcMyState = oMyState.thisState THIS.PARENT.RFI_TEXTBOX1.VALUE = ALLTRIM(lcMystate) THIS.PARENT.VALUE = ALLTRIM( lcMystate) THIS.PARENT.VALID() oMystate.release() ENDPROC