Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #4387

Re: Printing tabs from rtf

Subject Re: Printing tabs from rtf
From Camille Kater <katercamXXX@pt.lu>
Date 2012-11-22 10:13 +0100
Message-ID <50ADECB5.8000107@pt.lu> (permalink)
References <1dfe8f69-b8e8-4ead-8e2b-7838400fe955@googlegroups.com>
Newsgroups comp.lang.clipper.visual-objects

Show all headers | View raw


Hi Krystian,

Add a dispatch method to your Richedit class.
Add the following code:

METHOD Dispatch (oEvent) CLASS RichEdit
LOCAL oEvt AS Event
LOCAL nMsg AS DWORD
	
oEvt := oEvent
nMsg := oEvt:uMsg

DO CASE
CASE nMsg == WM_KEYDOWN .AND. oEvt:wparam == VK_TAB
	SELF:paste( _CHR (9) )
	RETURN SELF:eventReturnValue := 1L

.....
ENDCASE
RETURN SUPER:Dispatch (oEvt)

Better: write your own MyRichedit class and inherit your Richedit from 
MyRicheEdit class and add the dispatch method to this class.

Camille

On 22/11/2012 00:25, Krystian wrote:
> Hi,
>
> 1.
> when I print from a RichEdit control a rtf file formated with tabs, the listing is not correct - the subsequent rows do not start from the same column (I prepare a text in a winword in rtf format; I set normal tabs for 0,5 cm). How should I map tabs spacing from file into printer ?
>
> 2.
> When I press a tab key in richedit window editor, the whole text is marked - but I want to insert one tab point - how to achieve it ?
>
> Thanks in advance
> Krystian
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Printing tabs from rtf Krystian <softb@softb.pl> - 2012-11-21 15:25 -0800
  Re: Printing tabs from rtf Camille Kater <katercamXXX@pt.lu> - 2012-11-22 10:13 +0100
  Re: Printing tabs from rtf Krystian <softb@softb.pl> - 2012-11-27 17:06 -0800
    Re: Printing tabs from rtf Camille Kater <katercamXXX@pt.lu> - 2012-11-28 11:00 +0100
      Re: Printing tabs from rtf Krystian <softb@softb.pl> - 2012-11-30 06:12 -0800
        Re: Printing tabs from rtf D.J.W. van Kooten <public@ic2remove.this.com> - 2012-12-03 14:06 +0100

csiph-web