Jump to content

Search the Community

Showing results for tags 'guictrlsetstyle'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. My code. Does not work ;~ [optional] Control styles: ;~ $ES_AUTOHSCROLL - Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. ;~ $ES_AUTOVSCROLL - Automatically scrolls text up one page when the user presses the ENTER key on the last line. Local $hEditNewText = _GUICtrlEdit_Create($hGUI, "This is a test" & @CRLF & "Another Line", 8, 500, 715, 100) Local $iStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($hEditNewText), $GWL_STYLE) ; get style Local $iExStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($hEditNewText), $GWL_EXSTYLE) ; get extended style ;GUICtrlSetStyle($hEditNewText, BitXOR($iStyle, $ES_AUTOHSCROLL)) ; remove hscroll left to right (force wrap) GUICtrlSetStyle($hEditNewText, BitAND($iStyle, BitNOT($ES_AUTOHSCROLL))) https://www.autoitscript.com/wiki/Setting_Styles Also tried this ;~ https://www.autoitscript.com/forum/topic/113598-solved-scrolling-read-only-text-display-using-edit-not-input-control/ Local $hEditNewText = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 8, 500, 715, 100) Local $iStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($hEditNewText), $GWL_STYLE) ; get style Local $iExStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($hEditNewText), $GWL_EXSTYLE) ; get extended style GUICtrlSetStyle($hEditNewText, BitAND($iStyle, BitNOT($ES_AUTOHSCROLL))) However, this works: Local $hEditNewText = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 8, 500, 715, 100, $ES_WANTRETURN + $WS_VSCROLL + $ES_AUTOVSCROLL + $ES_MULTILINE + $WS_TABSTOP) My question stands. How to change the STYLE of an EDIT control? Skysnake
  2. Hi All, 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.
  3. Can't GUICtrlSetDefBkColor/GUICtrlSetBkColor and GUICtrlSetStyle be used at the same time? More specifically, using GUICtrlSetDefBkColor/GUICtrlSetBkColor stops AutoIt from having a gray holding affect on buttons (making them gray while you hold them).
×
×
  • Create New...