Sign in to follow this  
Followers 0
CodyBarrett

lol newb question about edit styles

7 posts in this topic

i would like an edit box wrap effect..... none of the styles do this they seem to do a random effect, any ideas?

Share this post


Link to post
Share on other sites



i would like an edit box wrap effect..... none of the styles do this they seem to do a random effect, any ideas?

What is an wrap effect?

Share this post


Link to post
Share on other sites

you know in notepad there is "wrap" like when text goes off the screen it automatically "wraps" to the next line

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

nvm i got it i just add this to the end

BitOR($ES_WANTRETURN, $WS_VSCROLL)

EDIT;

acutallly i have another question... im making a tcp chat gui and i cant make it so when i hit "Enter" and when the text apears on the heistory screen i cant make it automaticly start on a new line....uh anyhelp? i know ppl have made there own tcp chat but i wanna make my own lol

Edited by bob00037

Share this post


Link to post
Share on other sites

nvm i got it i just add this to the end

BitOR($ES_WANTRETURN, $WS_VSCROLL)

EDIT;

acutallly i have another question... im making a tcp chat gui and i cant make it so when i hit "Enter" and when the text apears on the heistory screen i cant make it automaticly start on a new line....uh anyhelp? i know ppl have made there own tcp chat but i wanna make my own lol

Add the style $ES_WANTRETURN to the edit.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

thats what i said like 3 post up.... i mean when i hit the "Send" button and it shows on the other persons computer, then i hit "Send" again how do i make it so it starts on the next line instead of just continuing the line with new entries

EDIT

ok i got it working SOMEHOW lol thanks anyway

Edited by bob00037

Share this post


Link to post
Share on other sites

@bob00037

i mean when i hit the "Send" button and it shows on the other persons computer, then i hit "Send" again how do i make it so it starts on the next line instead of just continuing the line with new entries

This?

#include <GuiConstantsEx.au3>
#include <GuiEdit.au3>
#include <ScrollBarConstants.au3>

Global $iLine = 0

$hGUI = GUICreate("Test", 300, 200)

$cEdit = GUICtrlCreateEdit("First line" & @CRLF, 10, 10, 280, 140)
GUICtrlSetData(-1, "Second Line" & @CRLF & _
               "Third Line" & @CRLF & _
               "Fourth Line", 1)

$cButton_Send = GUICtrlCreateButton("Send", 11, 166, 75, 23)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $cButton_Send
            $iLine += 1
            _LineScroll($cEdit, $iLine)
    EndSwitch
WEnd

Func _LineScroll($cCtrl, $iLine)
    Local $iIndex = GUICtrlSendMsg($cCtrl, $EM_LINEINDEX, $iLine, 0)
    If $iIndex = -1 Then Return 0
    
    GUICtrlSetState($cCtrl, $GUI_FOCUS)
    
    GUICtrlSendMsg($cCtrl, $EM_LINESCROLL, 0, $iLine)
    GUICtrlSendMsg($cCtrl, $EM_SETSEL, $iIndex, $iIndex)
EndFunc   ;==>_TextScroll

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  
Followers 0