GordonFreeman Posted November 13, 2013 Posted November 13, 2013 #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 610, 199, 192, 124) $ListView1 = GUICtrlCreateListView("Name|URL", 8, 8, 593, 185) GUICtrlCreateListViewItem("Google|www.google.com",$ListView1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I want set a color like a link color in webpages. Frabjous Installation
Moderators Melba23 Posted November 13, 2013 Moderators Posted November 13, 2013 GordonFreeman,And what have you tried so far? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
GordonFreeman Posted November 14, 2013 Author Posted November 14, 2013 I tried GUICtrlSetColor($LVI1, 0x2518B5) But no sucess, it color all sub itens as expected by func Frabjous Installation
Danyfirex Posted November 14, 2013 Posted November 14, 2013 Look this example: expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <WinAPI.au3> Global Const $FW_BOLD = 700 Global $Font = _WinAPI_CreateFont(14, 6, 0, 0, $FW_BOLD) $hGUI = GUICreate("Test", 300, 200) $hListView = _GUICtrlListView_Create($hGUI, "Items|SubItems", 10, 10, 280, 180, $LVS_REPORT, $WS_EX_CLIENTEDGE) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT)) _GUICtrlListView_AddItem($hListView, "Google") _GUICtrlListView_AddSubItem($hListView, 0, "www.google.com", 1) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _WinAPI_DeleteObject($Font) Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hListView Switch $iCode Case $NM_CUSTOMDRAW Local $tCustDraw = DllStructCreate('hwnd hwndFrom;int idFrom;int code;' & _ 'dword DrawStage;hwnd hdc;long rect[4];dword ItemSpec;int ItemState;dword Itemlparam;' & _ 'dword clrText;dword clrTextBk;int SubItem;' & _ 'dword ItemType;dword clrFace;int IconEffect;int IconPhase;int PartID;int StateID;long rectText[4];int Align', _ ;winxp or later $lParam) Local $iDrawStage = DllStructGetData($tCustDraw, 'DrawStage') If $iDrawStage = $CDDS_PREPAINT Then Return $CDRF_NOTIFYITEMDRAW Local $iItem = DllStructGetData($tCustDraw, 'ItemSpec') Switch $iItem Case 0 DllStructSetData($tCustDraw, 'clrText', 0xFF3E00) Local $hDC = DllStructGetData($tCustDraw, "hdc") _WinAPI_SelectObject($hDC, $Font) Return $CDRF_NEWFONT EndSwitch EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now