Severin
Number of posts : 19 Localisation : Germany/Braunschweig Registration date : 2010-12-13
| Subject: Re: Java Progress Bar issue (programming)? Sat Mar 30, 2013 8:01 am | |
| **************************************** PANORAMIC V 0.9.24 ist verfügbar PANORAMIC V 0.9.24 is available PANORAMIC V 0.9.24 est disponible PANORAMIC V 0.9.24 es disponible
Das Forum Panoramic ist wieder aktiv. Bitte besucht uns.
The forum Panoramic is active again.
Please, visits us.
Le forum Panoramic est actif de nouveau.
S'il vous plaît, nous visite.
El foro Panoramic es de nuevo activo.
Por favor, nos visita. ******************************************** | |
|
ygeronimi
Number of posts : 14 Age : 52 Localisation : France Registration date : 2013-03-13
| Subject: re Sat Mar 30, 2013 3:56 pm | |
| look at this (with Vs 0.9.24 ) : - Code:
-
' With Panoramic 0.9.24 Variables() Labels() Interface()
end
Sub Variables() dim x%,y%,Cpte%,file$,line$
End_sub
Sub Labels() Label Selection,View End_Sub
Sub Interface() font_name 0,"Arial" :font_size 0,10 Dlist 1 Edit 2 :top 2,25 :left 2,10 :width 2,250 Button 3:top 3,25 :left 3,270:height 3,21 :width 3,21:caption 3,"...":font_bold 3 cursor_point 3 :hint 3,"Select file":on_click 3,Selection Memo 4 :top 4,50 :left 4,10 :height 4,height(0)-150 :width 4,width(0)-36 Progress_bar 5 :top 5,height(0)-83 :left 5,10 :width 5,200 :Min 5,0:max 5,100 Alpha 6 : top 6,Top(5):left 6,left(5)+210 :Caption 6,"0 % " End_Sub
Selection: if object_exists(100)=0 Open_dialog 100 end_if clear 1 :clear 4:text 2,"":cpte%=0:position 5,0 caption 6,"0 %" file$=file_name$(100) if file$<>"_" text 2,file$ file_load 1,file$ gosub view end_if return
View: y%=count(1) for x%=1 to count(1) line$= item_read$(1,x%) item_add 4,line$ cpte%=(100/y%)*x% position 5,int(cpte%) caption 6,str$(cpte%)+" %" pause 100 next x% return
Last edited by ygeronimi on Sat Mar 30, 2013 7:54 pm; edited 2 times in total (Reason for editing : correction for open_dialog) | |
|
Klaus
Number of posts : 18 Age : 74 Localisation : France Registration date : 2013-03-23
| Subject: Re: Java Progress Bar issue (programming)? Sat Mar 30, 2013 6:37 pm | |
| Very nice demonstration of the progress bar. But: Please change the Selection subroutine to the following code: - Code:
-
Selection: if object_exists(100)=0 Open_dialog 100 ' else ' show 100 : ' useless on an invisible object end_if clear 1 :clear 4:text 2,"" file$=file_name$(100) if file$="_" then return : ' exit if no file selected text 2,file$ file_load 1,file$ gosub view return 1. an OPEN_DIALOG object is invisible by definition, so the SHOW command is useless 2. you have to check if a file is selected, otherwise the program crashes. | |
|
ygeronimi
Number of posts : 14 Age : 52 Localisation : France Registration date : 2013-03-13
| Subject: re Sat Mar 30, 2013 7:48 pm | |
| The code has been corrected... You can ask the "Open_Dialog" every time as you want... and exit it without selected file... | |
|
Sponsored content
| Subject: Re: Java Progress Bar issue (programming)? | |
| |
|