ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: probleme slider   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

lun. 22 décembre 2014, 10h48
ybenam
Algérie Algérie

atoutfox.public.association

Re: probleme slider

Voici un exemple de slider horizontal+vertical sur un form à titre d'illustration:

Publi yform
yform=Newobject("yslider")
yform.Show(1)
Return

Define Class yslider As Form
  Top = 0
  Left = 0
  Height = 250
  Width = 330
  Caption = "Ajouter des sliders à un Form."
  Name = "Form1"

  Add Object olecontrol1 As OleControl With ;
    oleClass="MSComctlLib.Slider.2",;
    Top = 10, ;
    Left = 24, ;
    Height = 37, ;
    Width = 169, ;
    Name = "Olecontrol1"

  Add Object olecontrol2 As OleControl With ;
    oleClass="MSComctlLib.Slider.2",;
    Top = 80, ;
    Left = 24, ;
    Height = 169, ;
    Width = 50, ;
    Name = "Olecontrol2"

  Procedure Init
  With This.olecontrol1
    .Orientation=0
    .Min=0
    .Max=100
    .Orientation=0  &&0,1
    .tickfrequency=5
    .tickstyle=0  &&0,1,2,3
    .smallChange=1
    .LargeChange=5
  Endwith

  With This.olecontrol2
    .Orientation=1
    .Min=0
    .Max=100
    .Orientation=1  &&0,1
    .tickfrequency=10
    .tickstyle=0  &&0,1,2,3
    .smallChange=1
    .LargeChange=5
    .Height=169
  Endwith

  Endproc

  Procedure olecontrol1.Change
  Local m.x
  m.x=This.Value
  Thisform.olecontrol2.Value=m.x
  Endproc

             Procedure olecontrol2.Change
  Local m.x
  m.x=This.Value
  Thisform.olecontrol1.Value=m.x
  Endproc


Enddefine


Bon courage !


Permalink : http://www.atoutfox.org/nntp.asp?ID=0000015555
20 286 messages dans le forum • Liste complète des messages

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2026.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3