Le forum (ô combien francophone) des utilisateurs de Powerbuilder.
Pages: 1
hello,
voici un petit objet que j'avais fait...il y a longtemps de cela deja... ca date de 2000
importez ce fichier "uo_line.sru"
puis, placez cet user objet dans une fenetre...
vous pouvez redimensionner la longueur de l'objet. (la hauteur restera toujours la meme)
et mettre ce bout de script sur l'evenement timer de la fenetre (uo_1 correspond à l'objet)
uo_1.triggerevent ("timer")
et voila...ca ne fait pas grande chose, mais ca le fait tout de meme.
$PBExportHeader$uo_line.sru $PBExportComments$*** SKA - effet de roller forward global type uo_line from userobject end type type ln_1 from line within uo_line end type type ln_2 from line within uo_line end type type ln_3 from line within uo_line end type type ln_4 from line within uo_line end type type ln_5 from line within uo_line end type type ln_6 from line within uo_line end type type ln_7 from line within uo_line end type end forward global type uo_line from userobject integer width = 2322 integer height = 32 boolean border = true long backcolor = 15780518 long tabtextcolor = 33554432 long picturemaskcolor = 536870912 event timer pbm_timer ln_1 ln_1 ln_2 ln_2 ln_3 ln_3 ln_4 ln_4 ln_5 ln_5 ln_6 ln_6 ln_7 ln_7 end type global uo_line uo_line type variables integer ii_line end variables forward prototypes public subroutine uo_resize () public subroutine uo_timer () end prototypes event timer;/**********************************************************************************************/ /* Nom : timer */ /* But : */ /* Arguments: */ /* Appel : */ /* Remarques: */ /* Histo : SKA - 2000 */ /**********************************************************************************************/ choose case ii_line case 1 ln_1.LineColor = RGB(255,255,0) ln_2.LineColor = RGB(0,0,128) ln_3.LineColor = RGB(0,0,128) ln_4.LineColor = RGB(0,0,128) ln_5.LineColor = RGB(0,0,128) ln_6.LineColor = RGB(0,0,128) ln_7.LineColor = RGB(255,255,0) case 2 ln_1.LineColor = RGB(255,255,0) ln_2.LineColor = RGB(255,255,0) ln_3.LineColor = RGB(0,0,128) ln_4.LineColor = RGB(0,0,128) ln_5.LineColor = RGB(0,0,128) ln_6.LineColor = RGB(0,0,128) ln_7.LineColor = RGB(0,0,128) case 3 ln_1.LineColor = RGB(0,0,128) ln_2.LineColor = RGB(255,255,0) ln_3.LineColor = RGB(255,255,0) ln_4.LineColor = RGB(0,0,128) ln_5.LineColor = RGB(0,0,128) ln_6.LineColor = RGB(0,0,128) ln_7.LineColor = RGB(0,0,128) case 4 ln_1.LineColor = RGB(0,0,128) ln_2.LineColor = RGB(0,0,128) ln_3.LineColor = RGB(255,255,0) ln_4.LineColor = RGB(255,255,0) ln_5.LineColor = RGB(0,0,128) ln_6.LineColor = RGB(0,0,128) ln_7.LineColor = RGB(0,0,128) case 5 ln_1.LineColor = RGB(0,0,128) ln_2.LineColor = RGB(0,0,128) ln_3.LineColor = RGB(0,0,128) ln_4.LineColor = RGB(255,255,0) ln_5.LineColor = RGB(255,255,0) ln_6.LineColor = RGB(0,0,128) ln_7.LineColor = RGB(0,0,128) case 6 ln_1.LineColor = RGB(0,0,128) ln_2.LineColor = RGB(0,0,128) ln_3.LineColor = RGB(0,0,128) ln_4.LineColor = RGB(0,0,128) ln_5.LineColor = RGB(255,255,0) ln_6.LineColor = RGB(255,255,0) ln_7.LineColor = RGB(0,0,128) case 7 ln_1.LineColor = RGB(0,0,128) ln_2.LineColor = RGB(0,0,128) ln_3.LineColor = RGB(0,0,128) ln_4.LineColor = RGB(0,0,128) ln_5.LineColor = RGB(0,0,128) ln_6.LineColor = RGB(255,255,0) ln_7.LineColor = RGB(255,255,0) end choose ii_line ++ if ii_line = 7 then ii_line = 1 end event public subroutine uo_resize ();/**********************************************************************************************/ /* Nom : uo_resize */ /* But : */ /* Arguments: */ /* Appel : */ /* Remarques: */ /* Histo : SKA - 2000 */ /**********************************************************************************************/ long ll_width ll_width = this.width this.height = 32 ln_1.beginx = 0 ln_2.beginx = 0 ln_3.beginx = 0 ln_4.beginx = 0 ln_5.beginx = 0 ln_6.beginx = 0 ln_7.beginx = 0 ln_1.endx = ll_width ln_2.endx = ll_width ln_3.endx = ll_width ln_4.endx = ll_width ln_5.endx = ll_width ln_6.endx = ll_width ln_7.endx = ll_width end subroutine public subroutine uo_timer ();/**********************************************************************************************/ /* Nom : uo_timer */ /* But : */ /* Arguments: */ /* Appel : */ /* Remarques: */ /* Histo : SKA - 2000 */ /**********************************************************************************************/ ii_line = 1 timer(.1) end subroutine on uo_line.create this.ln_1=create ln_1 this.ln_2=create ln_2 this.ln_3=create ln_3 this.ln_4=create ln_4 this.ln_5=create ln_5 this.ln_6=create ln_6 this.ln_7=create ln_7 this.Control[]={this.ln_1,& this.ln_2,& this.ln_3,& this.ln_4,& this.ln_5,& this.ln_6,& this.ln_7} end on on uo_line.destroy destroy(this.ln_1) destroy(this.ln_2) destroy(this.ln_3) destroy(this.ln_4) destroy(this.ln_5) destroy(this.ln_6) destroy(this.ln_7) end on event constructor;/**********************************************************************************************/ /* Nom : constructor */ /* But : */ /* Arguments: */ /* Appel : */ /* Remarques: */ /* Histo : SKA - 2000 */ /**********************************************************************************************/ uo_resize() uo_timer() end event type ln_1 from line within uo_line long linecolor = 16711680 integer linethickness = 4 integer beginx = 23 integer endx = 2254 end type type ln_2 from line within uo_line long linecolor = 8421376 integer linethickness = 4 integer beginx = 23 integer beginy = 4 integer endx = 2254 integer endy = 4 end type type ln_3 from line within uo_line long linecolor = 16711680 integer linethickness = 4 integer beginx = 23 integer beginy = 8 integer endx = 2254 integer endy = 8 end type type ln_4 from line within uo_line long linecolor = 8421376 integer linethickness = 4 integer beginx = 23 integer beginy = 12 integer endx = 2254 integer endy = 12 end type type ln_5 from line within uo_line long linecolor = 16711680 integer linethickness = 4 integer beginx = 23 integer beginy = 16 integer endx = 2254 integer endy = 16 end type type ln_6 from line within uo_line long linecolor = 8421376 integer linethickness = 4 integer beginx = 23 integer beginy = 20 integer endx = 2254 integer endy = 20 end type type ln_7 from line within uo_line long linecolor = 16711680 integer linethickness = 4 integer beginx = 23 integer beginy = 24 integer endx = 2254 integer endy = 24 end type
Hors ligne
Pages: 1