Google traducción
---------------------------------------------------------------------------------------------------------------------------------------------
Hello, my question is why not delete me elements of a graphic to print another. I have reviewed many times the example code and can not find the error. In my project so I have a CHILD window and thought that was the problem, but to make a demo, I see that it is not. Thank you.
Code: Select all
#include "hmg.ch"
function main
local ser:={ 3,2,1}
define window m at 0,0;
width 590;
height 600;
title "Previsualizar";
main;
nomaximize;
On Init ShowPie(ser);
backcolor { 255,255,255}
define button x
row 10
col 10
Height 50
caption "&Pastel"
action showpie(ser)
end button
define button br
row 10
col 150
Height 50
caption "&Barras"
action showbar(ser)
end button
define button y
row 10
col 430
Height 50
caption "&Salir"
action m.release
end button
Define Button Button_1
Row 10
Col 290
Height 50
Caption '&Imprimir'
End Button
end window
m.center
m.activate
return
Procedure showpie(ser)
ERASE WINDOW m
DRAW GRAPH IN WINDOW m AT 120,120;
TO 450,450 ;
TITLE "Reporte de Asistencia" ;
TYPE PIE;
SERIES ser;
DEPTH 25;
SERIENAMES {"Alum. que nunca faltan","Alum. que a veces faltan","Alum. que faltan con frecuencia"};
COLORS {{128,0,128},{255,0,0},{0,255,0}};
3DVIEW;
SHOWXVALUES;
SHOWLEGENDS;
NOBORDER
return
Procedure showBar(ser)
ERASE WINDOW m
DRAW GRAPH IN WINDOW m AT 120,120;
TO 450,480;
TITLE "Reporte de asistencia";
TYPE BARS;
SERIES { {3},{2},{1}};
YVALUES {"Bimestre 1"};
DEPTH 15;
BARWIDTH 10;
HVALUES 5;
SERIENAMES {"uno","dos","tres"};
COLORS { {128,128,255}, {255,102, 10}, {55,201, 48} };
3DVIEW;
SHOWGRID;
SHOWXVALUES;
SHOWYVALUES;
SHOWLEGENDS;
NOBORDER
Return