ich habe mal den Visual-Designer ausprobiert und BalloonTips eingefügt, jedoch tut sich überhaupt nichts. Hier im Forum ist ein Fehler beschrieben der sich um einen doppelten Eintrag bezüglich WindowID() dreht, jedoch ist der doch in der neuen Version nicht mehr drin?
Das Include habe ich durch den Inhalt der Datei erstetzt.
Code: Alles auswählen
; PureBasic Visual Designer v3.90 build 1361
;- Window Constants
;
Enumeration
#Hauptfenster
EndEnumeration
;- Gadget Constants
;
Enumeration
#Berechnen
#Seitenanzahl
#TextSeitenanzahl
#Startwinkel
#TextStartwinkel
#Endwinkel
#TextEndwinkel
#Stufenhoehe
#TextStufenhoehe
#String_1
#TextTreppenhoehe
#Kerndurchmesser
#TextKerndurchmesser
#Assendurchmesser
#TextAussendurchmesser
#Offset
#TextOffset
#Kern
#Caulk
#Detail
EndEnumeration
; BalloonTip Constants
#TOOLTIP_NO_ICON = 0
#TOOLTIP_INFO_ICON = 1
#TOOLTIP_WARNING_ICON = 2
#TOOLTIP_ERROR_ICON = 3
Procedure BalloonTip(WindowID, Gadget, Text$ , Title$, Icon)
ToolTip=CreateWindowEx_(0,"ToolTips_Class32","",#WS_POPUP | #TTS_NOPREFIX | #TTS_BALLOON,0,0,0,0,WindowID,0,GetModuleHandle_(0),0)
SendMessage_(ToolTip,#TTM_SETTIPTEXTCOLOR,GetSysColor_(#COLOR_INFOTEXT),0)
SendMessage_(ToolTip,#TTM_SETTIPBKCOLOR,GetSysColor_(#COLOR_INFOBK),0)
SendMessage_(ToolTip,#TTM_SETMAXTIPWIDTH,0,180)
Balloon.TOOLINFO\cbSize=SizeOf(TOOLINFO)
Balloon\uFlags=#TTF_IDISHWND | #TTF_SUBCLASS
Balloon\hWnd=WindowID
Balloon\uId=GadgetID(Gadget)
Balloon\lpszText=@Text$
SendMessage_(ToolTip, #TTM_ADDTOOL, 0, Balloon)
If Title$ > ""
SendMessage_(ToolTip, #TTM_SETTITLE, Icon, @Title$)
EndIf
EndProcedure
Procedure Open_Window_0()
If OpenWindow(#Hauptfenster, 253, 11, 200, 340, #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered , "TreppenTool")
If CreateGadgetList(WindowID(#Hauptfenster))
ButtonGadget(#Berechnen, 40, 305, 120, 20, "Berechnen")
BalloonTip(WindowID(#Hauptfenster), #Berechnen, "Hallo", "Berechnen", #TOOLTIP_INFO_ICON)
SpinGadget(#Seitenanzahl, 10, 10, 40, 20, 3, 60)
BalloonTip(WindowID(#Hauptfenster), #Seitenanzahl, "Hallo", "Seitenanzahl", #TOOLTIP_INFO_ICON)
TextGadget(#TextSeitenanzahl, 55, 13, 135, 14, "Anzahl der Seiten")
SpinGadget(#Startwinkel, 10, 40, 40, 20, 0, 359)
BalloonTip(WindowID(#Hauptfenster), #Startwinkel, "Hallo", "Startwinkel", #TOOLTIP_INFO_ICON)
TextGadget(#TextStartwinkel, 55, 43, 135, 14, "Startwinkel")
SpinGadget(#Endwinkel, 10, 70, 40, 20, 0, 359)
BalloonTip(WindowID(#Hauptfenster), #Endwinkel, "Hallo", "Endwinkel", #TOOLTIP_INFO_ICON)
TextGadget(#TextEndwinkel, 55, 73, 135, 14, "Endwinkel")
BalloonTip(WindowID(#Hauptfenster), #TextEndwinkel, "Hallo", "EndWinkel", #TOOLTIP_INFO_ICON)
SpinGadget(#Stufenhoehe, 10, 100, 40, 20, 1, 16)
BalloonTip(WindowID(#Hauptfenster), #Stufenhoehe, "Hallo", "Stufenhoehe", #TOOLTIP_INFO_ICON)
TextGadget(#TextStufenhoehe, 55, 103, 135, 14, "Stufenhöhe")
StringGadget(#String_1, 10, 130, 40, 20, "500", #PB_String_Numeric)
BalloonTip(WindowID(#Hauptfenster), #String_1, "Hallo", "Treppenhöhe", #TOOLTIP_INFO_ICON)
TextGadget(#TextTreppenhoehe, 55, 133, 135, 14, "Treppenhöhe")
StringGadget(#Kerndurchmesser, 10, 160, 40, 20, "50", #PB_String_Numeric)
BalloonTip(WindowID(#Hauptfenster), #Kerndurchmesser, "Hallo", "Kerndurchmesser", #TOOLTIP_INFO_ICON)
TextGadget(#TextKerndurchmesser, 55, 163, 135, 14, "Kerndurchmesser")
StringGadget(#Assendurchmesser, 10, 190, 40, 20, "300", #PB_String_Numeric)
BalloonTip(WindowID(#Hauptfenster), #Assendurchmesser, "Hallo", "Außendurchmesser", #TOOLTIP_INFO_ICON)
TextGadget(#TextAussendurchmesser, 55, 193, 135, 14, "Außendurchmesser")
SpinGadget(#Offset, 10, 220, 40, 20, 0, 10)
BalloonTip(WindowID(#Hauptfenster), #Offset, "Hallo", "Offset", #TOOLTIP_INFO_ICON)
TextGadget(#TextOffset, 55, 223, 135, 14, "Offset")
CheckBoxGadget(#Kern, 10, 245, 180, 20, "Kern")
BalloonTip(WindowID(#Hauptfenster), #Kern, "Hallo", "Kern", #TOOLTIP_INFO_ICON)
CheckBoxGadget(#Caulk, 10, 265, 180, 20, "Caulk Textur")
BalloonTip(WindowID(#Hauptfenster), #Caulk, "Hallo", "Caulk Textur", #TOOLTIP_INFO_ICON)
CheckBoxGadget(#Detail, 10, 285, 180, 20, "Detail Brushes")
BalloonTip(WindowID(#Hauptfenster), #Detail, "Hallo", "Detail Brushes", #TOOLTIP_INFO_ICON)
EndIf
EndIf
EndProcedure
Open_Window_0()
Repeat
Event = WaitWindowEvent()
If Event = #PB_EventGadget
;Debug "WindowID: " + Str(EventWindowID())
GadgetID = EventGadgetID()
If GadgetID = #Berechnen
ElseIf GadgetID = #Seitenanzahl
ElseIf GadgetID = #Startwinkel
ElseIf GadgetID = #Endwinkel
ElseIf GadgetID = #Stufenhoehe
ElseIf GadgetID = #String_1
ElseIf GadgetID = #Kerndurchmesser
ElseIf GadgetID = #Assendurchmesser
ElseIf GadgetID = #Offset
ElseIf GadgetID = #Kern
ElseIf GadgetID = #Caulk
ElseIf GadgetID = #Detail
EndIf
EndIf
Until Event = #PB_EventCloseWindow
End
;
Ich kann den Fehler nicht finden.