Jump to content

GuiCtrlCreateEdit Problem ?


 Share

Recommended Posts

`Hello There,

 

Recently my VDI was updated with a newer version of Windows 10 Version 1809 (Build 17763.805)

From that, I have trouble with GuiCtrlCreateEdit. Simply it won't create an edit box on the GUI.

Previously :

$hFED = GUICtrlCreateEdit($file, 8, 8, 593, 357, BitOR($WS_VSCROLL,  $ES_AUTOVSCROLL, $ES_READONLY))

This worked, but the Edit box won't appear anymore after the Windows 10 update.

 

Now :

$hFED1 = GUICtrlCreateEdit($file, 8, 8, 593, 257, BitOR($WS_VSCROLL,  $ES_AUTOVSCROLL, $ES_READONLY))
$hFED = GuiCtrlCreateEdit("", 8, 8, 593, 257, BitOR($WS_VSCROLL,  $ES_AUTOVSCROLL, $ES_READONLY))

The Edit Box will appear only with this code. Only the $hFED EditBox appears! How do i know it?  Because when I attached $file to $hFED EditBox it won't appear again on the GUI. It's even more strange how can it get data from $file when it is not attached to $hFED EditBox.

 

Screenshots: Notice the code below

Untitled.png.e581b18fd64a9b6e998dbb8c01c75e9e.png

 

After changing the code and creating double GUICtrlCreateEdit the EditBox appears.

Untitled2.png.4b806333be5a74e8927d979f91853452.png

 

Thank you.

 

Edited by Melba23
Removed "BUG" from title as it was not
Link to comment
Share on other sites

The 2 editboxes are on top of each other, you're using the same coordinates for both of them.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

1 hour ago, BrewManNH said:

The 2 editboxes are on top of each other, you're using the same coordinates for both of them.

Yes, exactly I need to put two edit boxes on each other so they can appear properly. If I put only one edit box that edit box will not appear.

Link to comment
Share on other sites

Post your script, or a runnable version that shows the same issue. Otherwise we're not really able to help.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

4 minutes ago, mikell said:

MS says : the default limit for the amount of text a user can enter in an edit control is 32,767 characters.

I think, you can increase this limit with _GUICtrlEdit_SetLimitText :

#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>

_Example()

Func _Example()
    Local $idEdit
    GUICreate("Edit Append Text", 400, 300)
    $idEdit = GUICtrlCreateEdit("Line 1 - This is a test" & @CRLF & "Line 2 - Another Line", 2, 2, 394, 268)

    ; Gets the current text limit for an edit control
    ConsoleWrite('1. _GUICtrlEdit_GetLimitText($idEdit) = ' & _GUICtrlEdit_GetLimitText($idEdit) & @CRLF)

    ; Sets a new text limit 
    _GUICtrlEdit_SetLimitText($idEdit, 1500000)
    ConsoleWrite('2. _GUICtrlEdit_GetLimitText($idEdit) = ' & _GUICtrlEdit_GetLimitText($idEdit) & @CRLF)

    GUISetState(@SW_SHOW)

    For $i = 1 To 40000
        _GUICtrlEdit_AppendText($idEdit, @CRLF & "Line " & $i & " - Append to the end")
    Next

    ; Loop until the user exits.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Example

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

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...