Posted: Sun Nov 25, 2007 9:16 am
Links are OK for me.
http://www.purebasic.com
https://www.purebasic.fr/english/
No, sorry.PB wrote:Is there any way to color a CheckBoxGadget's square with this?
MaybePB wrote:For the future, perhaps?
You could also draw on the window :byo wrote:It's not working here:
Unless there's something else to be done or I'm doing something wrong.Code: Select all
SetGadgetText(#txDicas, dica) InvalidateRect_(WindowID(#wMain), rect, #True)
Thanks for the fast reply.
Code: Select all
...
Select EventGadget()
Case 2
SetGadgetText(0, "this text was changed correctly!")
If StartDrawing(WindowOutput(0))
Box(GadgetX(1), GadgetY(1), GadgetWidth(1), GadgetHeight(1), GetSysColor_(#COLOR_3DFACE))
StopDrawing()
EndIf
SetGadgetText(1, "this text was not changed correctly!")
EndSelect
...
Code: Select all
brush = CreatePatternBrush_(ImageID(imgBackground))
SetClassLong_(WindowID(#wMain), #GCL_HBRBACKGROUND, brush)
Works here ?Rook Zimbabwe wrote:Very small issue:
If I have a multiline button and I color it... it is NO LONGER multiline!!!![]()
Is ther a workaround?
Code: Select all
Enumeration
#Window_0
EndEnumeration
Enumeration
#Button_0
EndEnumeration
Define.l Event, EventWindow, EventGadget, EventType, EventMenu
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 450, 200, 400, 400, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
If CreateGadgetList(WindowID(#Window_0))
ButtonGadget(#Button_0, 125, 85, 170, 45, "Line 1" + #CrLf$ + "Line 2", #PB_Button_MultiLine)
PureCOLOR_SetButtonColor(#Button_0, $FF, #PureCOLOR_SystemColor)
EndIf
EndIf
EndProcedure
OpenWindow_Window_0()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType()
If EventGadget = #Button_0
EndIf
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
Forever
Code: Select all
Enumeration
#Window_0
EndEnumeration
Enumeration
#Button_0
EndEnumeration
Define.l Event, EventWindow, EventGadget, EventType, EventMenu
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 450, 200, 400, 400, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
If CreateGadgetList(WindowID(#Window_0))
ButtonGadget(#Button_0, 125, 85, 170, 45, "Line 1 we only see 1 line of text on the button and we are sing UNICODE", #PB_Button_MultiLine)
; PureCOLOR_SetButtonColor(#Button_0, $FF, #PureCOLOR_SystemColor)
PureCOLOR_SetButtonColor(#Button_0, RGB(255,255,255), RGB(180,0,0), RGB(255,127,0), RGB(255,255,0))
EndIf
EndIf
EndProcedure
OpenWindow_Window_0()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType()
If EventGadget = #Button_0
EndIf
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
ForEver
POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.
POLINK: Fatal Error: 1 unresolved external(s.)
You mean you see line 1 and not line 2 if you compile my code example ?Rook Zimbabwe wrote:Well in your example I only say Line1 and not Line2
Anyway, #PB_Button_MultiLine currently only works if you use #CrLf$.Rook Zimbabwe wrote:ButtonGadget(#Button_0, 125, 85, 170, 45, "Line 1 we only see 1 line of text on the button and we are sing UNICODE", #PB_Button_MultiLine)
Did you use the adapted subsystem ?Rook Zimbabwe wrote:POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.
POLINK: Fatal Error: 1 unresolved external(s.)
You mean you see line 1 and not line 2 if you compile my code example ?
Still line 1... I have tried it both with the UNICODE off and ON and also both with the UNICODE LIB and Regular LIB. (4 ways tried it!)And if you increase the gadget height ?
Umm.... I don't know... What is it?Did you use the adapted subsystem ?