* SlideContainerDemo.PRG PUBLIC frmMain frmMain=createobject('subfrmMain') frmMain.Name='frmMain' frmMain.addobject('SideSlider','subSideSlider','MSComctlLib.Slider.2') with frmMain.SideSlider .borderstyle=1 .largechange=5 .max=100 .Orientation=1 .smallchange=1 .tickfrequency=1 .tickstyle=3 .Height=frmMain.Height-frmMain.SideSlider.top-0 endwith frmMain.Show read events * End define class subfrmMain as form caption=[Main - Container - Slider Demo] height=200 minheight=100 showwindow=2 ADD OBJECT cntMain as subcntMain procedure init AddItemContainers(thisform.cntMain) endproc procedure QueryUnload CLEAR EVENTS endproc procedure resize thisform.SideSlider.Height=thisform.height-thisform.SideSlider.top endproc ENDDEFINE DEFINE CLASS subcntEdit as Container height = 88 top=2 left=3 width=590 backcolor=8388863 ADD OBJECT edtBox as subEdit visible=.t. ENDDEFINE define class subcntMain as Container height=2702 && Can almost be any thing - vary with number of sub containers backcolor=rgb(192,192,192) left=20 top=0 width=600 visible=.t. enddefine DEFINE CLASS subEdit as EditBox height=84 left=2 top=2 width=586 visible=.t. ENDDEFINE define class subSideSlider as olecontrol &&========================= left=0 top=0 width=20 *!* max=1000 visible=.t. procedure Change thisform.cntMain.Top=-(this.value*thisform.cntMain.Height/100)+this.top endproc procedure Scroll this.change endproc enddefine &&class subSideSlider as olecontrol &&==================== procedure AddItemContainers(locntMain) &&--------------------------- FOR c=1 TO 30 lccntItem="_"+RIGHT(STR(10000+c,5),4) locntMain.addobject(lccntItem,'subcntEdit') locntItem=eval([locntMain.]+lccntItem) locntItem.edtBox.Value=lccntItem locntItem.Top=(c-1)*90+2 ENDFOR endproc &&AddItemContainers(locntMain) &&--------------------------->Hi all