Jump to content
Sign in to follow this  
EricF

Problem with Carriage Return after Combo text reactivation

Recommended Posts

EricF

Hi,

I developped a small soft with a Combo Text. If i launch it with a specific parameter, the combo text is read only, and can be reactivated with a button. All is okay..... except that the carriage return don't function in the Combo text after reactivation.

Here is the concerned parts of the code :

If StringInStr($CmdLineRaw, "/readonly") Then
$style_Combo = BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL,$ES_READONLY) ;Styles du Combo text en Lecture seule
Else
$style_Combo = BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL) ;Styles du Combo text en mode normal
EndIf

$Edit1 = GUICtrlCreateEdit($contenu_fichier, 15, 30, 420, $hauteur_edit, $style_Combo)

;Actions

While 1
$msg = GuiGetMsg()

Switch $msg
Case $GUI_EVENT_CLOSE
Exit
Case $btn_close
btn_close()
Case $btn_erase
btn_erase()
Case $btn_save
btn_save()
Case $btn_CreateLnk
btn_CreateShortcut()
Case $btn_ModifActiv
btn_ModifActiv()
EndSwitch
Wend



Func btn_ModifActiv()
GUICtrlSetState($btn_save, $GUI_ENABLE)
GUICtrlSetStyle($Edit1, $GUI_ENABLE)
GUICtrlSetState($btn_ModifActiv, $GUI_DISABLE)
GUICtrlSetData($btn_ModifActiv, "Mode Modif. activé")
MsgBox(64, "Activation de la modification", "Modification activée", 1)
EndFunc

I tried with GUICtrlSetState($Edit1, $GUI_DISABLE) instead of the style $ES_READONLY, the problem is the same.

AutoIt 3.3.8.1

Share this post


Link to post
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
Sign in to follow this  

×