Ein ListBox Control würde sich hier anbieten.
Via OwnerDraw zeichnet man die Items dann selber
Bei diesem Beispiel hab ich die Items als GDIPlus Bitmaps erstellt
d.H. Die Items können mit dem ganzen Funtionsumfang von GDI+ gestaltet werden - und das ist ne Menge
Spoiler anzeigen
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <GuiListBox.au3>
#include <ListBoxConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]Global Const $ODT_LISTBOX = 2
Global Const $ODA_DRAWENTIRE = 0x1
Global Const $ODA_SELECT = 0x2
Global Const $ODS_SELECTED = 0x1
Global Const $ODA_FOCUS = 0x4
Global Const $ItemHeight = 46
Global $iLB_Width = 300
Global $iLB_Height = 400
_GDIPlus_Startup()
Global $hGUI = GUICreate("Test", $iLB_Width + 20, $iLB_Height + 20)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
Global $hListBox = _GUICtrlListBox_Create($hGUI, "", 10, 10, $iLB_Width, $iLB_Height, BitOR($LBS_NOINTEGRALHEIGHT, $LBS_DISABLENOSCROLL, $WS_VSCROLL, $LBS_HASSTRINGS, $LBS_OWNERDRAWFIXED))
Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hListBox)
Global $hBrush = _GDIPlus_BrushCreateSolid(0x2000AAFF)
Global $hPen = _GDIPlus_PenCreate(0x8800FF00, 3)
_GUICtrlListBox_BeginUpdate($hListBox)
_GUICtrlListBox_SetItemHeight($hListBox, $ItemHeight)
Global $aItems[1]
For $i = 1 To 30
_CreateListBoxItem($aItems, $hListBox, "String " & $i, "Substring" & $i)
Next
_GUICtrlListBox_EndUpdate($hListBox)
GUIRegisterMsg($WM_DRAWITEM, "WM_DRAWITEM")
[/autoit] [autoit][/autoit] [autoit]GUISetState()
[/autoit] [autoit][/autoit] [autoit]While Sleep(100)
WEnd
Func _Exit()
For $i = 0 To UBound($aItems) - 1
_GDIPlus_BitmapDispose($aItems[$i])
Next
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>_Exit
Func _CreateListBoxItem(ByRef $aItems, $hListBox, $sString, $sSubString)
Local $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iLB_Width, $ItemHeight, $hGraphics)
Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetSmoothingMode($hContext, 2)
Local $iIndex = _GUICtrlListBox_AddString($hListBox, $sString)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsClear($hContext, 0xFFFFFFFF)
_GDIPlus_GraphicsDrawString($hContext, $sString, 10, 0, "Arial", 14)
_GDIPlus_GraphicsDrawString($hContext, $sSubString, 80, 25, "Arial", 10)
Local $hPen = _GDIPlus_PenCreate(0xFF0000FF, 2)
Local $hBrush = _GDIPlus_BrushCreateSolid(0xFFFFFF00)
_GDIPlus_GraphicsFillRect($hContext, 10, 25, 15, 15, $hBrush)
_GDIPlus_GraphicsDrawRect($hContext, 10, 25, 15, 15, $hPen)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hContext)
If UBound($aItems) <= $iIndex Then ReDim $aItems[$iIndex + 1]
$aItems[$iIndex] = $hBitmap
EndFunc ;==>_CreateListBoxItem
Func WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam)
Local $tDrawItem = DllStructCreate("uInt CtrlType; uInt CtrlID; uInt ItemID; uInt Action; uInt State; hWnd ItemHWND; hWnd hDC; Long Rect[4]; Ptr Data;", $lParam)
Local $iAction = DllStructGetData($tDrawItem, "Action")
Local $iIndex = DllStructGetData($tDrawItem, "ItemID")
Local $iX = DllStructGetData($tDrawItem, "Rect", 1)
Local $iY = DllStructGetData($tDrawItem, "Rect", 2)
Switch $iAction
Case $ODA_DRAWENTIRE, $ODA_SELECT
_GDIPlus_GraphicsDrawImage($hGraphics, $aItems[$iIndex], $iX, $iY)
If ($iAction = $ODA_SELECT) And (DllStructGetData($tDrawItem, "State") = $ODS_SELECTED) Then
Local $iW = DllStructGetData($tDrawItem, "Rect", 3) - $iX
Local $iH = DllStructGetData($tDrawItem, "Rect", 4) - $iY
_GDIPlus_GraphicsFillRect($hGraphics, $iX + 3, $iY + 3, $iW - 7, $iH - 7, $hBrush)
_GDIPlus_GraphicsDrawRect($hGraphics, $iX + 3, $iY + 3, $iW - 7, $iH - 7, $hPen)
EndIf
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_DRAWITEM
E