DateGadget --> No Events with Linux (gtk and gtk2)

Everything else that doesn't fall into one of the other PB categories.
bender-rulez
User
User
Posts: 49
Joined: Mon Mar 14, 2005 11:30 am

DateGadget --> No Events with Linux (gtk and gtk2)

Post by bender-rulez »

Hi

could it be that there is a bug in dategadget and calendargadget

I cant get events from that gadgets.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Well, i get events back but i found
#PB_Calender_Bold is not defined under linux
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> #PB_Calender_Bold is not defined under linux

Is that just a typo?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post 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!
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

I don't think the bold stuff is supported on linux. have to check that...
quidquid Latine dictum sit altum videtur
bender-rulez
User
User
Posts: 49
Joined: Mon Mar 14, 2005 11:30 am

Post 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?
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

DateGadget() doesn't support EventType() for now (on all OS).
bender-rulez
User
User
Posts: 49
Joined: Mon Mar 14, 2005 11:30 am

Post 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! :-(
Post Reply