TreeGadget with Checkboxes and images
TreeGadget with Checkboxes and images
This is a minor issue (if it's really an issue at all ), but when a TreeGadget has images and checkboxes, the checkbox and image are squashed right next to each other with no space between them. Is it possible to add a couple of pixels?
Re: TreeGadget with Checkboxes and images
Hi
Code: Select all
UsePNGImageDecoder()
LoadImage(0, #PB_Compiler_Home + "examples/sources/Data/ToolBar/New.png")
LoadImage(1, #PB_Compiler_Home + "examples/sources/Data/ToolBar/Open.png")
LoadImage(2, #PB_Compiler_Home + "examples/sources/Data/ToolBar/Save.png")
If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu |#PB_Window_ScreenCentered)
TreeGadget(0,10,10,480,230,#PB_Tree_CheckBoxes)
CreateImage(10,22,16,32,#PB_Image_Transparent )
NewImageList = ImageList_Create_(22,16, #ILC_COLOR32 | #ILC_MASK, 0, 10)
StartDrawing(ImageOutput(10))
DrawingMode(#PB_2DDrawing_AllChannels)
DrawImage(ImageID(0),6,0,16,16) ; 6 = 22 - 16
StopDrawing()
ImageList_Add_(NewImageList,ImageID(10),0)
StartDrawing(ImageOutput(10))
DrawImage(ImageID(1),6,0,16,16)
StopDrawing()
ImageList_Add_(NewImageList,ImageID(10),0)
StartDrawing(ImageOutput(10))
DrawImage(ImageID(2),6,0,16,16)
StopDrawing()
ImageList_Add_(NewImageList,ImageID(10),0)
FreeImage(10)
AddGadgetItem(0,-1,"Test-Item #1",0,0)
AddGadgetItem(0,-1,"Test-Item #2",ImageID(1),1)
AddGadgetItem(0,-1,"Test-Item #3",ImageID(2),0)
SendMessage_(GadgetID(0), #TVM_SETIMAGELIST, #TVSIL_NORMAL, NewImageList)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Egypt my love
- Kwai chang caine
- Always Here
- Posts: 5342
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: TreeGadget with Checkboxes and images
Hello wombats and RASHAD
Thanks for this code RASHAD
Just for information, if i not enable XP theme, the space between image and checkbox are black
Thanks for this code RASHAD
Just for information, if i not enable XP theme, the space between image and checkbox are black
The happiness is a road...
Not a destination
Not a destination
Re: TreeGadget with Checkboxes and images
Hi KCC
Change to
Change to
Code: Select all
CreateImage(10,22,16,24,$FFFFFF)
NewImageList = ImageList_Create_(22,16, #ILC_COLOR32 | #ILC_MASK, 0, 10)
StartDrawing(ImageOutput(10))
;DrawingMode(#PB_2DDrawing_AllChannels)
DrawImage(ImageID(0),6,0,16,16) ; 6 = 22 - 16
StopDrawing()
Egypt my love
Re: TreeGadget with Checkboxes and images
I love how Rashad comes in, says "Hi", posts some code like Santa Claus on Christmas morning, and then leaves.RASHAD wrote:Hi
Bless you, Rashad. You've helped so many coders, so many times. You rock!
- Kwai chang caine
- Always Here
- Posts: 5342
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: TreeGadget with Checkboxes and images
Yeeees !!!!! PERFECT !!!!SupeRashMan wrote:Hi KCC
Change to
It's the reason why RASHAD is one of my heroes, since a long time !!!!Dude wrote:Bless you, Rashad. You've helped so many coders, so many times. You rock!
RASHAD is the first egyptian, also big than the pyramids
The happiness is a road...
Not a destination
Not a destination
Re: TreeGadget with Checkboxes and images
Thank you, RASHAD! Wonderful code as always.