>>I suppose you could add a property to your listbox class called defaultValue. Then in the init() method of the listbox class you would put this.value = this.defaultValue.
>
>This is just a simple form done in a minute in order to test something. I thought we could assign a default value without writing code.
Maybe:
public frmLB
frmLB=createobject('form')
frmLB.Show
frmlb.addobject('oLB','ListBox')
foLB=frmLB.oLB
folb.visible=.t.
folb.additem('126.001.001.789')
folb.additem('126.002.001.789')
folb.additem('126.003.001.789')
folb.value='126.001.001.789'
But then again, maybe not<g>
Imagination is more important than knowledge