Hi,
In my example Code: Only the first DateGadget is working.
The second (ON the Panel) does not work!!!
Why??
I need a DateGadget on a Panelgadget....
Procedure Open_Panel_0()
If OpenWindow(0, 373, 151, 648, 439, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Panel0")
If CreateGadgetList(WindowID())
;- Panel0
PanelGadget(0, 18, 63, 603, 267)
AddGadgetItem(0, -1, "Tab 1")
CloseGadgetList()
EndIf
EndIf
EndProcedure
Open_Panel_0()
DateGadget(11, 156, 146, 110, 25, "Datum: %mm/%dd/%yyyy Zeit: %hh:%ii")
DateGadget(22, 156, 14, 110, 25, "Datum: %mm/%dd/%yyyy Zeit: %hh:%ii")
Repeat
While WindowEvent(): Delay(1) : Wend
ForEver
Panel Gadget & Dategadget together does not work ?!!!
-
- Enthusiast
- Posts: 665
- Joined: Fri Sep 12, 2003 10:40 pm
- Location: Tallahassee, Florida
you were trying to add gadgets to a panel when its gadget list was not open or being used. try this:
Code: Select all
Procedure Open_Panel_0()
If OpenWindow(0, 373, 151, 648, 439, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Panel0")
If CreateGadgetList(WindowID())
;- Panel0
PanelGadget(0, 18, 63, 603, 267)
AddGadgetItem(0, -1, "Tab 1")
DateGadget(11, 156, 146, 110, 25, "Datum: %mm/%dd/%yyyy Zeit: %hh:%ii")
DateGadget(22, 156, 14, 110, 25, "Datum: %mm/%dd/%yyyy Zeit: %hh:%ii")
CloseGadgetList()
EndIf
EndIf
EndProcedure
Open_Panel_0()
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_EventGadget
Select EventGadgetID()
Case 0
EndSelect
EndIf
Until EventID = #PB_EventCloseWindow
End
Code: Select all
!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
-
- Enthusiast
- Posts: 796
- Joined: Tue May 20, 2008 2:12 am
- Location: Cologne, Germany
- Contact:
I know, this is really old, but...guruk wrote:Thank I got it ...
I did the design with Visual Designer.. it look it does not support
Dategadget.. is this right?
At the moment, it still doesn't work on Mac.
It seems to be a bug in version Mac OS X 4.20 (4.30a1 also). See
my report here: http://www.purebasic.fr/english/viewtopic.php?t=33032
A copy'n'run-Version is here:
Code: Select all
Procedure Open_Panel_0()
If OpenWindow(0, 373, 151, 648, 439, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Panel0")
If CreateGadgetList(WindowID())
;- Panel0
PanelGadget(0, 18, 63, 603, 267)
;- the following shows up
DateGadget(11, 6, 6, 110, 25, "Datum: %mm/%dd/%yyyy Zeit: %hh:%ii")
AddGadgetItem(0, -1, "Tab 1")
;- the following does not show up...
DateGadget(22, 6, 6, 110, 25, "Datum: %mm/%dd/%yyyy Zeit: %hh:%ii")
CloseGadgetList()
EndIf
EndIf
EndProcedure
Open_Panel_0()
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_EventGadget
Select EventGadgetID()
Case 0
EndSelect
EndIf
Until EventID = #PB_EventCloseWindow
End
Regards,
JamiroKwai
JamiroKwai