Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Please Help ME !!!!!

BogelBogel Member Posts: 15
can i write to an edit from Right to Left??? can you help me???

Comments

  • Josh CodeJosh Code Member Posts: 675
    : can i write to an edit from Right to Left??? can you help me???
    :
    :

    Yes you can.

    Just use this code for the editbox's onkeypress event:
    [code]
    [b]procedure[/b] TForm1.Edit1KeyPress(Sender: TObject; [b]var[/b] Key: Char);
    [b]begin
    if[/b] (key=#8)and(edit1.text<>'') [b]then[/b]
    // backspace
    edit1.text:=copy(edit1.text,2,999)
    [b]else if[/b] key>#13 [b]then[/b]
    // a normal letter key
    edit1.text:=key+edit1.text;
    key:=#0;
    [b]end;[/b]
    [/code]

    The code above makes it so you add the input to the editbox's text with your own code and then by setting key to #0, nothing else is added automatically.
  • bikibiki Member Posts: 492
    [green]
    Set TEdit::BiDiMode to bdRightToLeft
    [/green]

    [size=2][red]

    [b]Bikram[/b][/red]
    [blue]http://www.geocities.com/nv5050[/blue]
    [red]**************************************[/red][/size]

  • Justin BibJustin Bib USAMember Posts: 0

    _____ ( http://forcoder.org ) free video tutorials and ebooks about ( MATLAB R Go PL/SQL Swift Scratch Python Visual Basic Ruby JavaScript Perl C++ Java Objective-C C# Delphi C Visual Basic .NET Assembly PHP Kotlin LabVIEW SAS Awk COBOL ML Erlang Julia Scala Alice Lua Prolog FoxPro F# ABAP Hack Crystal Scheme D VBScript Dart Transact-SQL Clojure Fortran Ada Apex Logo Lisp Bash Rust ) __

Sign In or Register to comment.