Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ReOrder Pages in a PageFrame at Run-Time
Message
De
29/12/2003 16:33:13
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
ReOrder Pages in a PageFrame at Run-Time
Divers
Thread ID:
00862654
Message ID:
00862654
Vues:
58
How to reorder pages in a pageframe at runtime? The below obviously will not work...

Any ideas?
DIMENSION pagename(5,2)
pagename(1,1) = "appscrn1.spr" && i.e. 'appscrn1' is a pagename on the form
pagename(2,1) = "appscrn2.spr"
pagename(3,1) = "appscrn3.spr"
pagename(4,1) = "appscrn4.spr"
pagename(5,1) = "appscrn5.spr"
FOR i = 1 TO ALEN(pagename,1)
   pagename(i,2) = i  && the array row is the pageorder value
ENDFOR

DODEFAULT()
i = 1
WITH THIS.PageFrame1
  i = 1
  lnitem = 0
  DO WHILE i <= .pagecount
    lnitem = ASCAN(pagename,.objects(i).name)
    IF lnitem = 0
      	.REMOVEOBJECT(.objects(i).name)
    ELSE
      *--There already is a page 3 so the below will not work if
      *--linitem is 3
      *--The page whose pageorder value is 3 now will be changed
      *--to another value but we haven't gotten there yet
      .objects(i).pageorder = lnitem  && error - this pageorder value is already used of course
      i = i + 1
    ENDIF
  ENDDO
ENDWITH
RETURN .T.
TIA
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform