Page 1 of 1
DateGadget --> No Events with Linux (gtk and gtk2)
Posted: Tue Jul 19, 2005 10:28 am
by bender-rulez
Hi
could it be that there is a bug in dategadget and calendargadget
I cant get events from that gadgets.
Posted: Tue Jul 19, 2005 12:21 pm
by Num3
Well, i get events back but i found
#PB_Calender_Bold is not defined under linux
Posted: Tue Jul 19, 2005 12:34 pm
by PB
> #PB_Calender_Bold is not defined under linux
Is that just a typo?
Posted: Tue Jul 19, 2005 12:35 pm
by Num3
PB wrote:> #PB_Calender_Bold is not defined under linux
Is that just a typo?
Sorry, my typo here... I use the PB editor, and it's written correctly..
The same code works in window!
Posted: Tue Jul 19, 2005 1:15 pm
by freak
I don't think the bold stuff is supported on linux. have to check that...
Posted: Tue Jul 19, 2005 1:28 pm
by bender-rulez
do you got an working example?
Code: Select all
If OpenWindow(0, 0, 0, 200, 250, #PB_Window_SystemMenu|#PB_Window_Screencentered,"DateGadget()")
If CreateGadgetList(WindowID())
DateGadget(1, 10, 10, 180, 25, "Date: %mm/%dd/%yyyy Time: %hh:%ii")
StringGadget(2, 10,40,180,25,"Normal StringGadget...")
Repeat
eid = WaitWindowEvent()
gadgetNumber = EventGadgetID()
Select eid
Case #PB_Event_Gadget
Event = EventType()
MessageRequester("info","gadget event",0)
Select Event
Case #PB_EventType_Focus
MessageRequester("info","has focus",0)
EndSelect
EndSelect
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
EndIf
I mean this. when you click into the stringGadget two messagerequester appears, but when clicked into the dateGadget nothing happens. even when i select a date, nothing happens?
I would need to do something when selecting a day, what event is it?
Posted: Tue Jul 19, 2005 2:25 pm
by Fred
DateGadget() doesn't support EventType() for now (on all OS).
Posted: Tue Jul 19, 2005 2:30 pm
by bender-rulez
aha, ok,
but one question, how do I write the value of the selected date in the stringgadget (in the example above)?
I know, I can get the value with getgadgetstate(#gadgetnumber)
but how to know when? no leftdoubleclick feature!
