there is a way to capture a listicon gadget with all of its row and columns ?
thanks.
Capture ListIconGadget
Capture ListIconGadget
Sorry for my bad english.
- captain_skank
- Enthusiast
- Posts: 641
- Joined: Fri Oct 06, 2006 3:57 pm
- Location: England
Re: Capture ListIconGadget
Simplest way i know is to cycle though each row and dump it to an array.
Re: Capture ListIconGadget
thank captain_skank but my mean from Capture is getting a picture, for example :
you see 2 row drops down and some details from seconds column that you can see them with scroolbars, so i want get a picture from all content of listbox without scrollbars, any body know a way ?
Code: Select all
If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(0, 1, "Address", 250)
AddGadgetItem(0, -1, "Harry Rannit"+Chr(10)+"12 Parliament Way, Battle Street, By the Bay")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
Sorry for my bad english.
Re: Capture ListIconGadget
You can use a graphic capture software for that like faststone
http://www.faststone.org/FSCapturerDownload.htm
if you want to use from your PB program, you should search for a similar which can be run in command line mode. (so you can use RunProgram ...)
http://www.faststone.org/FSCapturerDownload.htm
if you want to use from your PB program, you should search for a similar which can be run in command line mode. (so you can use RunProgram ...)
Re: Capture ListIconGadget
Hi
Adapt it for your needs
Adapt it for your needs
Code: Select all
Prototype.i p_PrintWindow(hWnd, hdc, flags)
OpenLibrary(1, "User32.dll")
PrintWindow.p_PrintWindow = GetFunction(1, "PrintWindow")
If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(0, 1, "Address", 250)
AddGadgetItem(0, -1, "Harry Rannit"+Chr(10)+"12 Parliament Way, Battle Street, By the Bay")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
Result = CountGadgetItems(0)
SendMessage_(GadgetID(0), #LVM_GETITEMRECT, Result - 1,r.RECT)
ResizeWindow(0,#PB_Ignore,#PB_Ignore,r\right+40,r\bottom+30)
ResizeGadget(0,#PB_Ignore,#PB_Ignore,r\right+30,r\bottom+20)
If CreateImage(1,r\right+30,r\bottom+20, 24)
hdc = StartDrawing(ImageOutput(1))
If hdc
PrintWindow(GadgetID(0), hdc, 0)
StopDrawing()
EndIf
EndIf
SaveImage(1,"f:\savetest.bmp")
ResizeGadget(0,#PB_Ignore,#PB_Ignore,290,90)
ResizeWindow(0,#PB_Ignore,#PB_Ignore,300,100)
InvalidateRect_(GadgetID(0),0,#True)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
Egypt my love