Please Help ME !!!!!

can i write to an edit from Right to Left??? can you help me???

Comments

  • : 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.
  • [green]
    Set TEdit::BiDiMode to bdRightToLeft
    [/green]

    [size=2][red]

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

Sign In or Register to comment.

Howdy, Stranger!

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

Categories