With the help of walbus I can give you some answers to your questions. Sorry for the long delay - the GFX_Wizzard package is not mine and was paused for some months. Now I can release an update by walbus...
The Wizzard_BF can of course also work with child windows.
See this demo code in the download package "_MAIN_Dynamic_Developing_Demo_Module_with_GIF_and_MessageRequester_BF" - this code shows the Messagerequester_BF when you press the "Bye" button.
Hi, look, this is the improved code for the Progressbar_EX code of the Wizzard_BF.
This is very simple, you have to use the canvas ID of this custom bars...
Code: Select all
XIncludeFile "./Progressbar_color_EX.pbi"
; Progressbar professional - Advanced using - Short slider demo ---
CompilerIf #PB_Compiler_IsMainFile
EnableExplicit
; Workaround Linux PB570 window background color
CompilerIf #PB_Compiler_OS=#PB_OS_Linux And Not Subsystem("gtk2") And Not Subsystem("qt")
Macro SetWindowColor(window_ID, color)
Window_SetCssBackColor(window_ID, color)
EndMacro
ImportC "" ; By Oma
gtk_css_provider_load_from_data(*css_provider, data_.p-utf8, length, *error.GError)
gtk_css_provider_new()
gtk_style_context_add_provider(*context, *provider, priority)
gtk_widget_get_style_context(*widget.GtkWidget)
EndImport
Procedure Window_SetCssBackColor(Window_ID, color)
#GTK_STYLE_PROVIDER_PRIORITY_USER=800
Protected color$, *gProvider=gtk_css_provider_new()
; Protected color$="#"+RSet(Hex(color), 6, "000000")
color$="#"+RSet(Hex(Red(color)), 2, "00")+RSet(Hex(Green(color)), 2, "00")+RSet(Hex(Blue(color)), 2, "00")
Protected.s WinBkGndCSS="window.background{background-color: "+color$+";" + #LF$ + "}"
gtk_css_provider_load_from_data(*gProvider, WinBkGndCSS, -1, #Null)
gtk_style_context_add_provider(gtk_widget_get_style_context(WindowID(window_ID)), *gProvider, #GTK_STYLE_PROVIDER_PRIORITY_USER)
EndProcedure
CompilerEndIf
Enumeration bars : #Bar_0 : EndEnumeration
Define win_event, canvas_ID, font_1_ID, font_2_ID, font_3_ID, resulted_ID, i, flip, i_1, i_2, i_3, i_4, i_5, i_6, i_7, i_8, i_9, back_color=$FF0000
If Not Defined(PB_ProgressBar_Horizontal , #PB_Constant) : #PB_ProgressBar_Horizontal=0 : EndIf
UsePNGImageDecoder()
UseJPEGImageDecoder()
Define texture_1_ID=LoadImage(#PB_Any, "./Image_Set/Caisse.png")
Define texture_2_ID=LoadImage(#PB_Any, "./Image_Set/Background.bmp")
Define texture_4_ID=LoadImage(#PB_Any, "./Image_Set/Dirt.jpg")
If Not texture_1_ID : texture_1_ID=LoadImage(#PB_Any, #PB_Compiler_Home+"Examples/3D/Data/Textures/Caisse.png") : EndIf
If Not texture_2_ID : texture_2_ID=LoadImage(#PB_Any, #PB_Compiler_Home+"Examples/Sources/Data/Background.bmp") : EndIf
If Not texture_4_ID : texture_4_ID=LoadImage(#PB_Any, #PB_Compiler_Home+"Examples/3D/Data/Textures/Dirt.jpg") : EndIf
Define texture_3_ID=CreateImage(#PB_Any, 50, 200, 24, $808080)
StartDrawing(ImageOutput(texture_3_ID))
Box(0, 0, 6, 67, $FF) : Box(44, 0, 6, 67, $FF)
Box(0, 67, 6, 67, $FF00) : Box(44, 67, 6, 67, $FF00)
Box(0, 134, 6, 67, $FFFF00) : Box(44, 134, 6, 67, $FFFF00)
StopDrawing()
CompilerIf #PB_Compiler_OS=#PB_OS_Windows : font_1_ID=LoadFont(#PB_Any, "Arial", 11) : CompilerEndIf ; Select a suitable font for each OS
CompilerIf #PB_Compiler_OS=#PB_OS_Linux : font_1_ID=LoadFont(#PB_Any, "Arial", 11) : CompilerEndIf
CompilerIf #PB_Compiler_OS=#PB_OS_MacOS : font_1_ID=LoadFont(#PB_Any, "Arial", 14) : CompilerEndIf
OpenWindow(0, #PB_Ignore, #PB_Ignore, 400, 460, "Progressbar EX - Multiple function demo output",
#PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_Invisible)
SetWindowColor(0, back_color)
AddWindowTimer(0, 1, 64) ; You can change
AddWindowTimer(0, 2, 3000) ; You can change
ProgressBarGadget(#Bar_0, 70, 55, 250, 25, 0, 100)
HideWindow(0, 0)
i_5=21
Define Hidden = 0
Repeat
If win_event=#PB_Event_Timer And EventTimer()=1
For i=0 To 1 ; Speed up *2
CompilerIf #PB_Compiler_OS=#PB_OS_MacOS
SetFrontText_1_EX("Please wait" ,89 ,1, 0, 0, 180, font_1_ID) ; Add text
CompilerElse
SetFrontText_1_EX("Please wait" ,88 ,4, 0, 0, 180, font_1_ID)
CompilerEndIf
SetCanvasFlags_EX(#PB_Canvas_Border)
SetSliderRounding_EX(8, 8)
ChangeSlider_EX(5, -11) ; Change the slider output pos progressbar #0 ; TODO - Change next Line - You must get the ID
resulted_ID=SetGadgetState_EX(#Bar_0, #PB_ProgressBar_Unknown, #PB_ProgressBar_Horizontal, 2, $FF00, $E6E6E6, $FF, 0, $AAAAAA) ; Replace the OS progressbar #0
Next
EndIf
If win_event=#PB_Event_Timer And EventTimer()=2
Hidden = ~Hidden
If Hidden
HideGadget( resulted_ID, 1 ) ; TODO - Set here the ID
Else
HideGadget( resulted_ID, 0 ) ; TODO - Set here the ID
EndIf
EndIf
win_event = WaitWindowEvent(1)
Until win_event = #PB_Event_CloseWindow
CompilerEndIf