Salut la communauté JMP,
Je souhaite extraire des éléments d'un journal existant en fonction de leur statut réduit/développé. J'ai essayé d'utiliser la méthode "Root << is collapsed (Node)" mais elle renvoie une valeur vide indépendamment de l'état Collapsed/Expanded (voir JSL travaux en cours dessous).
(JMP 16.1, Windows 10 Pro)
Des questions:
- La méthode "<< is Collapsed" est-elle applicable aux structures de journaux ?
- Si c'est le cas, quelle est son utilisation correcte, en particulier en ce qui concerne les définitions "racine" et "nœud" ?
- Si ce n'est pas le cas, quelle alternative puis-je utiliser pour renvoyer l'état réduit d'un élément du journal ?
Names Default to Here (1);
winlist = Window () << Get Window Title ();
For( i = N Items( winlist ), i > 0, i--,
If( (Window( winlist[i] ) << Window Class Name) != "Journal",
Remove From( winlist, i )
)
);
If (N items (winlist) == 0, New Window ("ERROR", Text Box ("!!!! NO JOURNAL CURRENTLY OPENED !!!!")); throw (1));
dw = New Window (" PICK A JOURNAL ",
<< MODAL,
V List Box (
Text Box (" SELECT A JOURNAL"),
wl = List Box ( winlist,
Width (500),
Max Selected (1),
nlines (10)
),
Text Box (" Enter number of plots per row"),
nbe = Number Edit Box (5),
Text Box (" REMOVE LEGEND? "),
rb = Radio Box( {"YES", "NO"}),
Text Box (" PLOT ONLY EXPANDED? "),
rb2 = Radio Box( {"YES", "NO"}),
Button Box ("OK", jrn_l = (wl << get selected); npr = nbe << get (); lg_x = rb << get (); ex_x = rb2 << get (); switch = 1),
Button Box ("CANCEL", switch = 0; Throw(1))
),
);
show (jrn_l);
show (npr);
show (lg_x);
show (ex_x);
If (switch == 0, Throw (1));
jrn = Get Window (jrn_l [1]);
show (jrn);
nplot = N Items (jrn << Xpath ("//OutlineBox"));
dummy = Lineup Box(N Col (1));
win = New window ("PLOTS",
mybox = Lineup Box (N Col (npr))
);
For (i = 1, i<= nplot, i++,
collp = jrn << is collapsed (OutlineBox (i));
show (collp);
if (collp == 1,
dummy = Lineup Box(N Col (1));
Plot = jrn [PictureBox (i)];
dummy << Append (Plot);
if(lg_x == 1,
zzz = Dummy << Xpath ("//LegendBox");
zzz << delete
);
mybox << Append (Dummy)
)
);
Merci.
Meilleur,
TS