Jump to content

RichEdit resize


jcpetu
 Share

Recommended Posts

Hi people, I'm trying to resize a Richedit without success, can anyone help please. 

#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>
;----------------------------------------------------------------------------------------------------------------------
#Region Options
Opt('GUIOnEventMode', 1)
Opt('GUICloseOnESC', 0)
#EndRegion Options
#Region Variables
Global $GuiMain, $GUIversion = 'Rich Edit Resize', $DeskW = @DesktopWidth - 13, $DeskH = @DesktopHeight - 60
Global $I1, $I2, $Edit1, $Edit2
#EndRegion Variables

$GuiMain = GUICreate($GUIversion, $DeskW, $DeskH, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX))
GUISetOnEvent($GUI_EVENT_CLOSE, 'CloseApp')

$I1 = GUICtrlCreateInput('', 66, 30, 581, 31)
GUICtrlSetResizing(-1, 1)

$I2 = GUICtrlCreateInput('', 66, 70, 581, 31)
GUICtrlSetResizing(-1, 1)


$Edit1 = _GUICtrlRichEdit_Create($GuiMain, '', 10, 140, ($DeskW / 2) - 10, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
GUICtrlSetResizing(-1, 1)

$Edit2 = _GUICtrlRichEdit_Create($GuiMain, '', ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
GUICtrlSetResizing(-1, 1)

$LV1 = GUICtrlCreateListView("", 8, 480, $DeskW - 18, 161, -1, BitOR($LVS_EX_CHECKBOXES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER))
GUICtrlSetResizing(-1, 1)
_GUICtrlListView_AddColumn(-1, "#", 30, 1)
_GUICtrlListView_AddColumn(-1, "Date", 110, 2)
_GUICtrlListView_AddColumn(-1, "Time", 110, 2)
_GUICtrlListView_AddColumn(-1, "Event", 110, 2)

GUISetState(@SW_SHOW, $GuiMain)

While 1
WEnd

Func CloseApp()
    _GUICtrlRichEdit_Destroy($Edit1)
    _GUICtrlRichEdit_Destroy($Edit2)
    GUIDelete($GuiMain)
    Exit
EndFunc   ;==>CloseApp

Thanks!

Link to comment
Share on other sites

  • Moderators

jcpetu,

GUIctrlSetResizing only works for native controls - when i need to resize a UDF-created control I usually use a disabled label like this:

#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>
;----------------------------------------------------------------------------------------------------------------------
#Region Options
Opt('GUIOnEventMode', 1)
Opt('GUICloseOnESC', 0)
#EndRegion Options
#Region Variables
Global $GuiMain, $GUIversion = 'Rich Edit Resize', $DeskW = @DesktopWidth - 13, $DeskH = @DesktopHeight - 60
Global $I1, $I2, $Edit1, $Edit2
#EndRegion Variables

$GuiMain = GUICreate($GUIversion, $DeskW, $DeskH, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX))
GUISetOnEvent($GUI_EVENT_CLOSE, 'CloseApp')
GUISetBkColor(0xC4C4C4) ; Just so you can see the RichEdits

$I1 = GUICtrlCreateInput('', 66, 30, 581, 31)
GUICtrlSetResizing(-1, 1)

$I2 = GUICtrlCreateInput('', 66, 70, 581, 31)
GUICtrlSetResizing(-1, 1)


$Edit1 = _GUICtrlRichEdit_Create($GuiMain, '', 10, 140, ($DeskW / 2) - 10, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
; Create underlying label
$cLabel_1 = GUICtrlCreateLabel("", 10, 140, ($DeskW / 2) - 10, 320)
GUICtrlSetResizing($cLabel_1, 1)
GUICtrlSetState($cLabel_1, $GUI_DISABLE) ; Most important!

$Edit2 = _GUICtrlRichEdit_Create($GuiMain, '', ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
$cLabel_2 = GUICtrlCreateLabel("", ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320)
GUICtrlSetResizing($cLabel_2, 1)
GUICtrlSetState($cLabel_2, $GUI_DISABLE)

$LV1 = GUICtrlCreateListView("", 8, 480, $DeskW - 18, 161, -1, BitOR($LVS_EX_CHECKBOXES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER))
GUICtrlSetResizing(-1, 1)
_GUICtrlListView_AddColumn(-1, "#", 30, 1)
_GUICtrlListView_AddColumn(-1, "Date", 110, 2)
_GUICtrlListView_AddColumn(-1, "Time", 110, 2)
_GUICtrlListView_AddColumn(-1, "Event", 110, 2)

GUISetState(@SW_SHOW, $GuiMain)

; Register the SIZE message
GUIRegisterMsg($WM_SIZE, "_WM_SIZE")

While 1
    Sleep(10)
WEnd

Func CloseApp()
    _GUICtrlRichEdit_Destroy($Edit1)
    _GUICtrlRichEdit_Destroy($Edit2)
    GUIDelete($GuiMain)
    Exit
EndFunc   ;==>CloseApp

Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam)

    ; If it is our GUI
    If $hWnd = $GuiMain Then
        ; Get the new position and size of the labels
        $aPos_1 = ControlGetPos($GuiMain, "", $cLabel_1)
        $aPos_2 = ControlGetPos($GuiMain, "", $cLabel_2)
        ; And set the RichEdits to the same position and size
        WinMove($Edit1, "", $aPos_1[0], $aPos_1[1], $aPos_1[2], $aPos_1[3])
        WinMove($Edit2, "", $aPos_2[0], $aPos_2[1], $aPos_2[2], $aPos_2[3])
    EndIf

EndFunc

M23

Edit: Same principle as the post above.

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Musashi, the workaround of TheDcoder works fine only if there is a Richedit that occupies all the window area.

Melba, I modified your script just commenting the  GUISetBkColor and positioning each label before the Richedit. But when I resize the GUI the Richedit controls doesn't resize correctly. 😕

#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>
;----------------------------------------------------------------------------------------------------------------------
#Region Options
Opt('GUIOnEventMode', 1)
Opt('GUICloseOnESC', 0)
#EndRegion Options
#Region Variables
Global $GuiMain, $GUIversion = 'Rich Edit Resize', $DeskW = @DesktopWidth - 13, $DeskH = @DesktopHeight - 60
Global $I1, $I2, $Edit1, $Edit2
#EndRegion Variables

$GuiMain = GUICreate($GUIversion, $DeskW, $DeskH, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX))
GUISetOnEvent($GUI_EVENT_CLOSE, 'CloseApp')
;GUISetBkColor(0xC4C4C4) ; Just so you can see the RichEdits

$I1 = GUICtrlCreateInput('', 66, 30, 581, 31)
GUICtrlSetResizing(-1, 1)

$I2 = GUICtrlCreateInput('', 66, 70, 581, 31)
GUICtrlSetResizing(-1, 1)


$cLabel_1 = GUICtrlCreateLabel("", 10, 140, ($DeskW / 2) - 10, 320)
GUICtrlSetResizing($cLabel_1, 1)
GUICtrlSetState($cLabel_1, $GUI_DISABLE) ; Most important!
$Edit1 = _GUICtrlRichEdit_Create($GuiMain, '', 10, 140, ($DeskW / 2) - 10, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
; Create underlying label

$cLabel_2 = GUICtrlCreateLabel("", ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320)
GUICtrlSetResizing($cLabel_2, 1)
GUICtrlSetState($cLabel_2, $GUI_DISABLE)
$Edit2 = _GUICtrlRichEdit_Create($GuiMain, '', ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))

$LV1 = GUICtrlCreateListView("", 8, 480, $DeskW - 18, 161, -1, BitOR($LVS_EX_CHECKBOXES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER))
GUICtrlSetResizing(-1, 1)
_GUICtrlListView_AddColumn(-1, "#", 30, 1)
_GUICtrlListView_AddColumn(-1, "Date", 110, 2)
_GUICtrlListView_AddColumn(-1, "Time", 110, 2)
_GUICtrlListView_AddColumn(-1, "Event", 110, 2)

GUISetState(@SW_SHOW, $GuiMain)

; Register the SIZE message
GUIRegisterMsg($WM_SIZE, "_WM_SIZE")

While 1
    Sleep(10)
WEnd

Func CloseApp()
    _GUICtrlRichEdit_Destroy($Edit1)
    _GUICtrlRichEdit_Destroy($Edit2)
    GUIDelete($GuiMain)
    Exit
EndFunc   ;==>CloseApp

Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam)

    ; If it is our GUI
    If $hWnd = $GuiMain Then
        ; Get the new position and size of the labels
        $aPos_1 = ControlGetPos($GuiMain, "", $cLabel_1)
        $aPos_2 = ControlGetPos($GuiMain, "", $cLabel_2)
        ; And set the RichEdits to the same position and size
        WinMove($Edit1, "", $aPos_1[0], $aPos_1[1], $aPos_1[2], $aPos_1[3])
        WinMove($Edit2, "", $aPos_2[0], $aPos_2[1], $aPos_2[2], $aPos_2[3])
    EndIf

EndFunc

 

Captura.JPG1.JPG

Link to comment
Share on other sites

  • Moderators

jcpetu,

The script works if you resize the GUI by dragging the mouse - I suspect in the case above you are using the minimize/maximize buttons of the GUI. In that case we need to widen the events that trigger the resizing - like this:

#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>
;----------------------------------------------------------------------------------------------------------------------
#Region Options
Opt('GUIOnEventMode', 1)
Opt('GUICloseOnESC', 0)
#EndRegion Options
#Region Variables
Global $GuiMain, $GUIversion = 'Rich Edit Resize', $DeskW = @DesktopWidth - 13, $DeskH = @DesktopHeight - 60
Global $I1, $I2, $Edit1, $Edit2
#EndRegion Variables

$GuiMain = GUICreate($GUIversion, $DeskW, $DeskH, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX))
GUISetOnEvent($GUI_EVENT_CLOSE, 'CloseApp')
GUISetOnEvent($GUI_EVENT_RESTORE, '_Resize')
GUISetOnEvent($GUI_EVENT_MAXIMIZE, '_Resize')
;GUISetBkColor(0xC4C4C4) ; Just so you can see the RichEdits

$I1 = GUICtrlCreateInput('', 66, 30, 581, 31)
GUICtrlSetResizing(-1, 1)

$I2 = GUICtrlCreateInput('', 66, 70, 581, 31)
GUICtrlSetResizing(-1, 1)


$cLabel_1 = GUICtrlCreateLabel("", 10, 140, ($DeskW / 2) - 10, 320)
GUICtrlSetResizing($cLabel_1, 1)
GUICtrlSetState($cLabel_1, $GUI_DISABLE) ; Most important!
$Edit1 = _GUICtrlRichEdit_Create($GuiMain, '', 10, 140, ($DeskW / 2) - 10, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
; Create underlying label

$cLabel_2 = GUICtrlCreateLabel("", ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320)
GUICtrlSetResizing($cLabel_2, 1)
GUICtrlSetState($cLabel_2, $GUI_DISABLE)
$Edit2 = _GUICtrlRichEdit_Create($GuiMain, '', ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))

$LV1 = GUICtrlCreateListView("", 8, 480, $DeskW - 18, 161, -1, BitOR($LVS_EX_CHECKBOXES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER))
GUICtrlSetResizing(-1, 1)
_GUICtrlListView_AddColumn(-1, "#", 30, 1)
_GUICtrlListView_AddColumn(-1, "Date", 110, 2)
_GUICtrlListView_AddColumn(-1, "Time", 110, 2)
_GUICtrlListView_AddColumn(-1, "Event", 110, 2)

GUISetState(@SW_SHOW, $GuiMain)

; Register the SIZE message
GUIRegisterMsg($WM_SIZE, "_WM_SIZE")

While 1
    Sleep(10)
WEnd

Func CloseApp()
    _GUICtrlRichEdit_Destroy($Edit1)
    _GUICtrlRichEdit_Destroy($Edit2)
    GUIDelete($GuiMain)
    Exit
EndFunc   ;==>CloseApp

Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam)

    ; If it is our GUI
    If $hWnd = $GuiMain Then
        _Resize()
    EndIf

EndFunc

Func _Resize()

    ; Get the new position and size of the labels
    $aPos_1 = ControlGetPos($GuiMain, "", $cLabel_1)
    $aPos_2 = ControlGetPos($GuiMain, "", $cLabel_2)
    ; And set the RichEdits to the same position and size
    WinMove($Edit1, "", $aPos_1[0], $aPos_1[1], $aPos_1[2], $aPos_1[3])
    WinMove($Edit2, "", $aPos_2[0], $aPos_2[1], $aPos_2[2], $aPos_2[3])

EndFunc

How is it now?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Melba23,  in my case when I minimize/maximize it works fine but when I drag the mouse occurs something strange, the first time I drag the mouse it doesn't resize the Richedits correctly, if I drag the mouse again in the same direction as I did before but only few pixels, it resize the Richedits correctly, but if I drag the mouse in other direction or a longer distance it doesn't resize them well.😳

I also noticed that if the Richedits are not correctly resized and I open another program and the go to my GUI, the Richedits auto resize well.

 

Captura.JPG2.JPG

Link to comment
Share on other sites

  • Moderators

jcpetu,

Very strange - everything works just fine for me. As the RichEdits do resize correctly when you do something else, try adding this line at the end of the _Resize function:

_WinAPI_RedrawWindow($GuiMain)

Any better?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

jcpetu,

Then I am afraid I am out of ideas. Using the script I have not yet managed to fail to get the RichEdits resized when the GUI is resized - and I have been using this trick for many years to resize UDF-created controls without problem. Sorry.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Link to comment
Share on other sites

1 minute ago, jcpetu said:

The only thing could be that I have two monitors?

Could be IDK.  You could try to remove one monitor temporarily, see if that changes anything...

Link to comment
Share on other sites

I had strange problem too recently solved with a GUI redraw. 

_WinAPI_RedrawWindow($hGui)

@Nine :)

 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • 1 month later...

Hi everybody,
I would like to revive this thread for 2 reasons :

1) In case jcpetu (OP) still got his issue unsolved, maybe the solution below could work for him.

2) To share with you an alternate way of resizing UDF-created controls, without using the "disabled label way" described in this thread (though it worked fine for me). All credits go to MrCreatoR's UDF GUICtrlSetResizingEx.au3 version 1.3 found in this link.

For the record, I discovered MrCreatoR's UDF just now, after having read this new thread from matwachich in this link.

So here is jcpetu's code, simplified, with 1 line only to resize the RichEdit controls and it worked great for me, with lesser (apparent) code. Fingers crossed for you, jcpetu :)

#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>

#include 'GUICtrlSetResizingEx.au3' ; https://www.autoitscript.com/forum/topic/202781-guictrlsetresizing-on-udf-createwindowex-created-controls/?tab=comments#comment-1455745

Opt('GUIOnEventMode', 1)
Opt('GUICloseOnESC', 0)

Global $GuiMain, $GUIversion = 'Rich Edit Resize', $DeskW = @DesktopWidth - 20, $DeskH = @DesktopHeight - 80
Global $I1, $I2, $Edit1, $Edit2

$GuiMain = GUICreate($GUIversion, $DeskW, $DeskH, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX))
; GUISetBkColor(0xC4C4C4) ; Just so you can see the RichEdits

GUISetOnEvent($GUI_EVENT_CLOSE, 'CloseApp')

$I1 = GUICtrlCreateInput('', 66, 30, 581, 31)
GUICtrlSetResizing(-1, 1)

$I2 = GUICtrlCreateInput('', 66, 70, 581, 31)
GUICtrlSetResizing(-1, 1)

$Edit1 = _GUICtrlRichEdit_Create($GuiMain, '', 10, 140, ($DeskW / 2) - 10, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
_GUICtrlSetResizingEx($Edit1, $GUI_DOCKAUTO)

$Edit2 = _GUICtrlRichEdit_Create($GuiMain, '', ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
_GUICtrlSetResizingEx($Edit2, $GUI_DOCKAUTO)

$LV1 = GUICtrlCreateListView("", 8, 480, $DeskW - 18, 161, -1, BitOR($LVS_EX_CHECKBOXES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER))
GUICtrlSetResizing(-1, 1)
_GUICtrlListView_AddColumn(-1, "#", 30, 1)
_GUICtrlListView_AddColumn(-1, "Date", 110, 2)
_GUICtrlListView_AddColumn(-1, "Time", 110, 2)
_GUICtrlListView_AddColumn(-1, "Event", 110, 2)

GUISetState(@SW_SHOW, $GuiMain)

While 1
    Sleep(10)
WEnd

Func CloseApp()
    _GUICtrlRichEdit_Destroy($Edit1)
    _GUICtrlRichEdit_Destroy($Edit2)
    GUIDelete($GuiMain)
    Exit
EndFunc   ;==>CloseApp

To make it easier for you to run the script, I attach below MrCreatoR's UDF GUICtrlSetResizingEx.au3 (version 1.3 dated 09/22/2015), it's the original UDF as found in his archive file :

GUICtrlSetResizingEx.au3

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...