LeHuynhNam Posted December 13, 2008 Share Posted December 13, 2008 (edited) I have a combo box like this: $HomeDrive = @HomeDrive $1 = StringLeft($HomeDrive, 1) $input1 = GUICtrlCreateCombo ($1, 288, 185, 52, 21,0x2042,-1) _GUICtrlComboBox_LimitText($input1,1) Global $odd = DriveGetDrive ("all") For $i = 1 To $odd[0] $result = StringTrimRight($odd[$i], 1) GUICtrlSetData ($input1, $result, $odd[1]) Next GUISetState ()but i want in this combo box, it has the own drive's icon like this:what should i do? Edited December 13, 2008 by LeHuynhNam Link to comment Share on other sites More sharing options...
martin Posted December 13, 2008 Share Posted December 13, 2008 I have a combo box like this: $HomeDrive = @HomeDrive $1 = StringLeft($HomeDrive, 1) $input1 = GUICtrlCreateCombo ($1, 288, 185, 52, 21,0x2042,-1) _GUICtrlComboBox_LimitText($input1,1) Global $odd = DriveGetDrive ("all") For $i = 1 To $odd[0] $result = StringTrimRight($odd[$i], 1) GUICtrlSetData ($input1, $result, $odd[1]) Next GUISetState () but i want in this combo box, it has the own drive's icon like this: what should i do? Look at the example in the help for _GUICtrlComboBoxEx_GetImageList Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
LeHuynhNam Posted December 14, 2008 Author Share Posted December 14, 2008 i've read it many times but i mean when the icon of drive change, the icon in the combo box also changed! like the combo box update the drive icon and list them with its letter, such as: [icon of C drive] [C:\] Link to comment Share on other sites More sharing options...
SadBunny Posted December 14, 2008 Share Posted December 14, 2008 i've read it many times but i mean when the icon of drive change, the icon in the combo box also changed! like the combo box update the drive icon and list them with its letter, such as: [icon of C drive] [C:\] Don't you just mean FileSelectFolder("test","c:\")? Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
LeHuynhNam Posted December 14, 2008 Author Share Posted December 14, 2008 no! u see the title of this topic, "Problem with combo box" not fileselect folder. I mean can i add the drive icon to combo box and update its icon. my script's here: $HomeDrive = @HomeDrive $1 = StringLeft($HomeDrive, 1) $input1 = GUICtrlCreateCombo ($1, 288, 185, 52, 21,0x2042,-1) _GUICtrlComboBox_LimitText($input1,1) Global $odd = DriveGetDrive ("all") For $i = 1 To $odd[0] $result = StringTrimRight($odd[$i], 1) GUICtrlSetData ($input1, $result, $odd[1]) Next GUISetState () but it only show the drive without its icon, i want it can view the drive icon also! Link to comment Share on other sites More sharing options...
SadBunny Posted December 14, 2008 Share Posted December 14, 2008 Check the helpfile for the example of the _GUICtrlComboBoxEx_SetImageList command. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
LeHuynhNam Posted December 18, 2008 Author Share Posted December 18, 2008 i know what u mean but u know? when i use _GUICtrlComboBoxEx_SetImageList i have to use _GUIImageList_AddIcon ($hImage, [color="#FF0000"]@SystemDir & "\shell32.dll", 146[/color]) but i don't know how to get an icon of my drive to list it to combo box? my drive's icon can change and i want when the icon changed the combo box can update its icon and view with its letter! how can i do? Link to comment Share on other sites More sharing options...
LeHuynhNam Posted December 31, 2008 Author Share Posted December 31, 2008 ...bump... anybody can give me an example script to solve this problem Link to comment Share on other sites More sharing options...
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