Page 1 of 1
Posted: Wed Oct 23, 2002 5:02 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
Have someone an idea how to set the background color for "TextGadget" and "CheckBoxGadget" to white $ffffff ???? I think it will be possible with SendMessage_ command...!? Thanks for help...
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Posted: Wed Oct 23, 2002 5:26 pm
by BackupUser
Restored from previous forum. Originally posted by fweil.
Start with this post. I suppose you will adapt it well to your needs for the textgadget.
For the checkbox I did search in API documentation, maybe it is a sendmessage. Dunno.
Rgrds
Francois Weil
14, rue Douer
F64100 Bayonne
Posted: Wed Oct 23, 2002 5:27 pm
by BackupUser
Restored from previous forum. Originally posted by fweil.
.... ooops ....
Sorry for the missing link :
viewtopic.php?t=2078
Francois Weil
14, rue Douer
F64100 Bayonne
Posted: Wed Oct 23, 2002 5:57 pm
by BackupUser
Restored from previous forum. Originally posted by Berikco
Here is a little sample
Code: Select all
OpenWindow(0,100,150,400,400,#PB_Window_SystemMenu,"TEST")
Global Yellow, Green, blauw
Yellow = CreateSolidBrush_($66E8FB)
Green = CreateSolidBrush_($7BDF84)
blauw=CreateSolidBrush_($E5B91A)
Procedure myCallback(WindowID, Message, wParam, lParam)
Result = #PB_ProcessPureBasicEvents
If Message = #WM_CTLCOLORSTATIC
Select lparam
Case GadgetID(1)
Debug lparam
SetBkMode_(wParam,#TRANSPARENT)
SetTextColor_(wParam, $FFFFFF)
Result = Green
Case GadgetID(4)
SetBkMode_(wParam,#TRANSPARENT)
SetTextColor_(wParam, $FFFFFF)
Result = blauw
EndSelect
ElseIf Message =#WM_CTLCOLOREDIT
Select lparam
Case GadgetID(3)
SetBkMode_(wParam,#TRANSPARENT)
SetTextColor_(wParam, $FFFFFF)
Result = Yellow
EndSelect
EndIf
ProcedureReturn Result
EndProcedure
CreateGadgetList(WindowID())
PanelGadget(0,5,5,390,390)
AddGadgetItem(0,-1,"TAB1")
TextGadget(1,10,10,100,15,"Hoegaarden",#PB_Text_Center)
TextGadget(2,120,10,100,15,"Jupiler",#PB_Text_Center)
StringGadget(3, 10, 40, 200, 40, "Goedendag allemaal, voor mij een pintje" , #PB_String_Multiline)
CheckBoxGadget(4, 10, 90,100, 20, "Beer Here")
CloseGadgetList()
SetWindowCallback(@myCallback())
Repeat
Until WaitWindowEvent() = #PB_EventCloseWindow
Posted: Wed Oct 23, 2002 7:11 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
Thanks for any help and esp. many thanks to Berikco for the working example! Thx again!
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Posted: Wed Oct 23, 2002 7:16 pm
by BackupUser
Restored from previous forum. Originally posted by Rings.
nice example Beriko
Its a long way to the top if you wanna .....CodeGuru