Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TreeLine kind of flexible fields in VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00936885
Message ID:
00937328
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
Read the comments in my post before this one. I had paste issue w/my NS - so - just for you, I used IE (for a minute:-)
* 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
>
>Has anybody seen TreeLine outline utility? http://www.bellz.org/treeline/index.html
>
>It has a treeview and each and every node has the facility to be clicked on and configured. This configuration allows similar node to use the same settings of fields, thus nodes a, d and f of type default will have 3 text cum edit box, and nodes b,c and e can have a type of say custom and this can have 1 text cum edit box, 1 date field.
>
>I am interested in how this kind of data fields handling can be done in VFP, as we don't know what the user is going to select for fields.
>
>Hope I could explain in words my thoughts.
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform