arts Posted October 23, 2014 Share Posted October 23, 2014 (edited) Hello, I need to create a color picker with a limited and pre-defined number of colors to pick. Is it possible to do it with _GUIColorPicker_Create ? Thank you. Update: [sOLVED] with the ColorPicker UDF that allows to determine palette. Thank you. Edited October 24, 2014 by arts Link to comment Share on other sites More sharing options...
Solution iamtheky Posted October 23, 2014 Solution Share Posted October 23, 2014 you could probably make your own with labels fairly simply.. heres 5 minutes to make 3 color picker #include <StaticConstants.au3> #include <GUIConstantsEx.au3> GuiCreate("3 color picker" , 320 , 100) $LBL_red = GUICtrlCreateLabel("" , 0, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0xFF0000) $LBL_green = GUICtrlCreateLabel("" , 110, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0x00FF00) $LBL_blue = GUICtrlCreateLabel("" , 220, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0x0000FF) guisetstate() While 1 Switch GUIGetMsg() Case $GUI_EVENT_PrimaryDown Case $LBL_blue msgbox(0, '' , "You Picked Blue") Case $LBL_green msgbox(0, '' , "You Picked Green") Case $LBL_red msgbox(0, '' , "You Picked Red") Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd arts 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
arts Posted October 23, 2014 Author Share Posted October 23, 2014 you could probably make your own with labels fairly simply.. heres 5 minutes to make 3 color picker #include <StaticConstants.au3> #include <GUIConstantsEx.au3> GuiCreate("3 color picker" , 320 , 100) $LBL_red = GUICtrlCreateLabel("" , 0, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0xFF0000) $LBL_green = GUICtrlCreateLabel("" , 110, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0x00FF00) $LBL_blue = GUICtrlCreateLabel("" , 220, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0x0000FF) guisetstate() While 1 Switch GUIGetMsg() Case $GUI_EVENT_PrimaryDown Case $LBL_blue msgbox(0, '' , "You Picked Blue") Case $LBL_green msgbox(0, '' , "You Picked Green") Case $LBL_red msgbox(0, '' , "You Picked Red") Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Thank you very much. Anyway this doesn't use the _GUIColorPicker_Create and I am looking for a solution similar to the ColorPicker UDF but limited to a few colors. Any idea? Link to comment Share on other sites More sharing options...
iamtheky Posted October 23, 2014 Share Posted October 23, 2014 (edited) Anyway this doesn't use the _GUIColorPicker_Create and I am looking for a solution similar to the ColorPicker UDF You are looking for a solution that utilizes _GuiColorPicker_Create in a solution similar to the ColorPicker UDF? And that question is not in the least bit painful when you think about it? You want to use the UDF? or you want to create your own? Edited October 23, 2014 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
arts Posted October 23, 2014 Author Share Posted October 23, 2014 (edited) You are looking for a solution that utilizes _GuiColorPicker_Create in a solution similar to the ColorPicker UDF? And that question is not in the least bit painful when you think about it? You want to use the UDF? or you want to create your own? Ok, I mixed the _GUIColorPicker_Create function of the Color Picker Control UDF Library for AutoIt3 with the the Autoit3 function Choose_Color. I don't want to create any UDF. So, rephrasing, I want to know if there's a way of limiting the number of colors available in a color picker like the one displayed by the ColorPicker UDF but using the AutoIt3 function Choose_Color. Thanks. Update: [sOLVED] with the ColorPicker UDF that allows to determine palette. Thank you. Edited October 24, 2014 by arts Link to comment Share on other sites More sharing options...
arts Posted October 24, 2014 Author Share Posted October 24, 2014 Hello, I need to create a color picker with a limited and pre-defined number of colors to pick. Is it possible to do it with _GUIColorPicker_Create ? Thank you. [sOLVED] with the ColorPicker UDF that allows to determine palette. Thank you. 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