Recently Browsing 0 members
No registered users viewing this page.
Good evening, I need to configure a graphical interface where the contents of some "Button" are taken from a file I have foreseen to include with "#include".
For the text no problem, the problem comes when I'm going to assign the color to the background of the "Button", the "Button" becomes BLACK WHITE.
I included in the included file as follows:
$ Promotion_Color = "$ Color_Red"
Clarity I also imported #include the library <ColorConstants.au3>
In the main program I wrote like this:
$ Promotion = GUICtrlCreateButton ($ Promotion, Dim_Fin_X + $ 170, $ Dim_Fin_Y, 750.120)
GUICtrlSetFont (-1, 70, 800, 0, "Calibri")
GUICtrlSetBkColor ($ Promotion, $ Promotion_Color); will change background color
I thank all those who want to help me
Hello guys, I would have the need to import into the GUICtrlCreateListView all * .txt files in a folder. The * .txt files contain all of the same formatting separated by "|", the script should go on every single file and bring me back the result in the GUICtrlCreateListView. For now I only managed to upload a single file * .txt into the GUICtrlCreateListView with this code:
Case $Button_Find $File_txt = "\\cond\UPDATE\test.txt" Dim $Array_List _FileReadToArray($File_txt, $Array_List) $Limit_Array = UBound($Array_List) - 1 For $i = 1 To $Limit_Array $All_Box = String($Array_List[$i]) GUICtrlCreateListViewItem($All_Box, $List) Next For $i2 = 0 To _GUICtrlListView_GetColumnCount($List) _GUICtrlListView_SetColumnWidth($List, $i2, $LVSCW_AUTOSIZE_USEHEADER) Next
I'm working on this project:
$Import = GUICtrlCreateButton("Import", 15, 175, 90, 40, $WS_GROUP) $List = GUICtrlCreateListView("Name|Address|E-mail", 15, 220, 400, 363, $LVS_SORTDESCENDING) $Item1 = GUICtrlCreateListViewItem("test|test|test", $List) GUISetState(@SW_SHOW, $GUI) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Exit Exit Case $Import $Table_Import = FileOpenDialog("Import list '*.txt'", @DesktopDir & "\", "Text (*.txt)") If @error Then ContinueLoop GUICtrlSetData($Item1, $Table_Import) In the text file the fields are delimited with "|" and the values are not in the same row but one below the other.
However in the txt file the sum of the values may change.
Can you help me?
I've created a script and i'd like when the user adds a new item on the ListView, that new item to be placed on top.
GUICtrlCreateListViewItem places newly created ListViewItems right below the older ones. Is there a way to display the newest iten on top of the list view?
Thanks a lot in advance!
I'm sure this is a simple one to answer and I have searched and experimented before I asked (well enough hopefully!)
I'm trying to set a button background to be white, the font colour red, centred vertically and horizontally and multi-line. Can it be done?
Here is my example code:
#include <Constants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ColorConstantS.au3> #include <FontConstants.au3> #include "ColorConstants.au3" Opt("GUIOnEventMode", 1) $GUI = GUICreate("GUI", 250, 300) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Button = GUICtrlCreateButton("Button" & @CRLF & "One", 160, 185, 85, 110, BitOR($BS_MULTILINE, $BS_CENTER, $BS_VCENTER, $WS_EX_WINDOWEDGE)) GUICtrlSetBkColor(-1, $COLOR_White) GUICtrlSetFont($Button, 14, 800, 0, "MV Boli", 5) GUICtrlSetColor($Button, 0xFF0000) GUICtrlSetOnEvent($Button, "_Exit") GUISetState() While 1 Sleep(100) WEnd Func _Exit() Exit EndFunc ;==>_ExitWith everything I have tried, this is the closest I get, button white, font red, correct font, but no centring and sometimes no multi-line (depending on button text and font size). I saw I might have to add the default button forced style back in so I did that too $WS_EX_WindowEdge.
Thanks for any help and apologies if I've missed an obvious answer to this elsewhere.