Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/26/2011 in all areas

  1. playlet

    ---

    ---
    1 point
  2. zbatev, Yes it does; #include <buttonconstants.au3> #include <editconstants.au3> #include <guiconstantsex.au3> #include <windowsconstants.au3> #include <staticconstants.au3> #include <constants.au3> #include <winapi.au3> $Form1 = GUICreate("Form1", 246, 165, 192, 114) $Edit1 = GUICtrlCreateEdit("", 8, 8, 225, 121, BitOr($ES_AUTOVSCROLL, $ES_AUTOHSCROLL)) GUICtrlSetData(-1, "this is supposed to be a very long and whiny statement that should force this string to go to the next line and I hope it does.") $Checkbox1 = GUICtrlCreateCheckbox("Wrap Text", 152, 136, 81, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Checkbox1 $iStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($Edit1), $GWL_STYLE) If GUICtrlRead($Checkbox1) = 1 Then ConsoleWrite("Checked" & @CRLF) $sData = GUICtrlRead($Edit1) GUICtrlDelete($Edit1) $Edit1 = GUICtrlCreateEdit("", 8, 8, 225, 121, BitOr($ES_AUTOVSCROLL, $ES_MULTILINE)) GUICtrlSetData($Edit1, $sData) Else ConsoleWrite("UnChecked" & @CRLF) $sData = GUICtrlRead($Edit1) GUICtrlDelete($Edit1) $Edit1 = GUICtrlCreateEdit("", 8, 8, 225, 121, BitOr($ES_AUTOVSCROLL, $ES_AUTOHSCROLL)) GUICtrlSetData($Edit1, $sData) EndIf EndSwitch WEnd I am still looking into how you can do it dynamically by changing the style alone. M23 Edit: Looks like it cannot be done - the styles are seemingly among those that cannot be altered dynamically. Even MSDN suggests the delete/create method.
    1 point
  3. Zedna

    List Box help

    Global $leftupdate_prev = '' Global $leftupdate_empty = _StringRepeat(' ',19) ... $leftupdate = "STN "&Guictrlread($baby1_1)&","&Guictrlread($baby1_2) If $leftupdate <> $leftupdate_prev Then $leftupdate_prev = $leftupdate Else $leftupdate = $leftupdate_empty EndIf $midupdate = " --- WCB "&GUICtrlRead($baby1_3) $rightupdate = " --- DIST "&GUICtrlRead($baby1_4) If UBound($baby1_grapharray) < 3 Then GUICtrlSetData($baby1_history,$leftupdate&$midupdate&$rightupdate) Else $leftupdate = " " GUICtrlSetData($baby1_history,$leftupdate&$midupdate&$rightupdate) EndIf EDIT: If you want help with listview column widths then don't hesitate to ask istview is much better for this purpose than listbox
    1 point
  4. There is known bug/limitation in Send/ControlSend with national keyboards, escpecially with Czech one. One workaround is to switch keyboard to english then use Send/ControlSend and then switch it back. More elegant solution in your example is to use COM commands for all desired actions instead of Send/ControlSend. Search MSDN for Range/Copy/Paste and look at Excel.au3 sources to get idea and instead of +{F11} use _ExcelSheetAddNew()
    1 point
×
×
  • Create New...