English
Source / code snippets

Insert Delete MultiEdit as an afterthought Lines

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
MultiEdit: Zeilen nachträglich einfügen oder löschen
 $H Messages.ph
 $H Windows.ph
Declare multi&,Ende&
cls

Proc AddLineToMulti

    Parameters Multi&,Text$
    Declare TextEnde&
    Text$ = Text$+
    TextEnde& =  Len(GetText$(Multi&))
    ~sendmessage(Multi&,~EM_SETSEL,TextEnde&,TextEnde&)
    ~sendmessage(Multi&,~EM_REPLACESEL,1,addr(Text$))

EndProc

Proc InsertLineToMulti

    Parameters Multi&,Text$,Line&
    Declare Index&
    Index& = ~sendMessage(Multi&,~EM_LINEINDEX,Line&-1,0)

    If Index& > -1

        Text$ = Text$+
        ~sendmessage(Multi&,~EM_SETSEL,Index&,Index&)
        ~sendmessage(Multi&,~EM_REPLACESEL,1,addr(Text$))

    else

        AddLineToMulti(Multi&,Text$)

    endif

EndProc

Proc RemoveMultiLine

    Parameters Multi&,Line&
    Declare Index&,Index1&
    Index& = ~sendMessage(Multi&,~EM_LINEINDEX,Line&-1,0)
    Index1& = ~sendMessage(Multi&,~EM_LINEINDEX,Line&,0)
    ~sendmessage(Multi&,~EM_SETSEL,Index&,Index1&)
    ~sendmessage(Multi&,~EM_REPLACESEL,1,)

Endproc

Proc GetMultiLineText

    Parameters Multi&,Line&
    Declare Retval$
    RetVal$ = space$(1024)
    ~sendmessage(Multi&,~EM_GETLINE,Line&-1,addr(Retval$))
    Return Trim$(RetVal$)

Endproc

Multi& = Create(MultiEdit,%hwnd,,40,0,300,300)
AddLineToMulti(Multi&,Test)Text anhängen
AddLineToMulti(Multi&,Test1)
AddLineToMulti(Multi&,Test2)
AddLineToMulti(Multi&,Test3)
AddLineToMulti(Multi&,Test4)
InsertLineToMulti(Multi&,Einfügen in Zeile 3,3)Text in Zeile einfügen
InsertLineToMulti(Multi&,Einfügen in Zeile 5,5)
InsertLineToMulti(Multi&,Einfügen in Zeile 10,10)geht nicht also ans Ende
AddLineToMulti(Multi&,Test5)
InsertLineToMulti(Multi&,Einfügen in Zeile 1,1)
Waitinput
RemoveMultiLine(Multi&,5)Zeile entfernen
waitinput
Messagebox(GetMultiLineText(Multi&,1),Inhalt von Zeile 1,0)

whilenot ende&

    waitinput

end
 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.530 Views

Untitledvor 0 min.
RudiB.04/21/22

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie