Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #4386 > unrolled thread
| Started by | Krystian <softb@softb.pl> |
|---|---|
| First post | 2012-11-21 15:25 -0800 |
| Last post | 2012-12-03 14:06 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
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
| From | Krystian <softb@softb.pl> |
|---|---|
| Date | 2012-11-21 15:25 -0800 |
| Subject | Printing tabs from rtf |
| Message-ID | <1dfe8f69-b8e8-4ead-8e2b-7838400fe955@googlegroups.com> |
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
[toc] | [next] | [standalone]
| From | Camille Kater <katercamXXX@pt.lu> |
|---|---|
| Date | 2012-11-22 10:13 +0100 |
| Message-ID | <50ADECB5.8000107@pt.lu> |
| In reply to | #4386 |
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 >
[toc] | [prev] | [next] | [standalone]
| From | Krystian <softb@softb.pl> |
|---|---|
| Date | 2012-11-27 17:06 -0800 |
| Message-ID | <a84d37fa-146e-48f1-b623-bf85435ef74f@googlegroups.com> |
| In reply to | #4386 |
W dniu czwartek, 22 listopada 2012 00:25:38 UTC+1 użytkownik Krystian napisał:
> 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
Hi Camille,
Thank you very much for answer, but (it is shame to write), i do not understand this mechanism; i paste your code to my app but the tab key still marks the whole text. I made it a method of this class called during editting of the file
CLASS Edycja_RTF INHERIT DATAWINDOW
PROTECT oDCOkno_RTF AS RICHEDIT
//{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
PROTECT plik_rtf AS STRING
PROTECT katalog_rtf AS STRING
...
I see in a debugger, that the program enters the code but it does not recognize the tab key sequence.
Thank you
Krystian
[toc] | [prev] | [next] | [standalone]
| From | Camille Kater <katercamXXX@pt.lu> |
|---|---|
| Date | 2012-11-28 11:00 +0100 |
| Message-ID | <50B5E0DB.1040604@pt.lu> |
| In reply to | #4398 |
Krystian,
Did you inherit the RTF control (not the Datawindow class) from my
suggested class ?
You can do that in the Window Editor.
Camille
On 28/11/2012 02:06, Krystian wrote:
> W dniu czwartek, 22 listopada 2012 00:25:38 UTC+1 użytkownik Krystian napisał:
>> 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
>
> Hi Camille,
>
> Thank you very much for answer, but (it is shame to write), i do not understand this mechanism; i paste your code to my app but the tab key still marks the whole text. I made it a method of this class called during editting of the file
> CLASS Edycja_RTF INHERIT DATAWINDOW
>
> PROTECT oDCOkno_RTF AS RICHEDIT
>
> //{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
> PROTECT plik_rtf AS STRING
> PROTECT katalog_rtf AS STRING
> ...
> I see in a debugger, that the program enters the code but it does not recognize the tab key sequence.
>
> Thank you
> Krystian
>
[toc] | [prev] | [next] | [standalone]
| From | Krystian <softb@softb.pl> |
|---|---|
| Date | 2012-11-30 06:12 -0800 |
| Message-ID | <48ac998e-91d9-42a3-b31c-cadebef63d0d@googlegroups.com> |
| In reply to | #4399 |
W dniu środa, 28 listopada 2012 11:00:59 UTC+1 użytkownik Camille Kater napisał:
> Krystian,
>
>
>
> Did you inherit the RTF control (not the Datawindow class) from my
>
> suggested class ?
>
> You can do that in the Window Editor.
>
>
>
> Camille
>
>
>
>
>
> On 28/11/2012 02:06, Krystian wrote:
>
> > W dniu czwartek, 22 listopada 2012 00:25:38 UTC+1 użytkownik Krystian napisał:
>
> >> 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
>
> >
>
> > Hi Camille,
>
> >
>
> > Thank you very much for answer, but (it is shame to write), i do not understand this mechanism; i paste your code to my app but the tab key still marks the whole text. I made it a method of this class called during editting of the file
>
> > CLASS Edycja_RTF INHERIT DATAWINDOW
>
> >
>
> > PROTECT oDCOkno_RTF AS RICHEDIT
>
> >
>
> > //{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
>
> > PROTECT plik_rtf AS STRING
>
> > PROTECT katalog_rtf AS STRING
>
> > ...
>
> > I see in a debugger, that the program enters the code but it does not recognize the tab key sequence.
>
> >
>
> > Thank you
>
> > Krystian
>
> >
Hi Camille;
Thank you - now it works (almost) correctly (I'm really horrified; how huge and extensive is the problem of programming in win os; and how little i know and understand yet; the manuals are so poor).
The problem is the length of tabs - they are by default 1,25 cm, even if i set them by SetTabStops to 0,5 cm. What else should i set to achieve shorter tabs spacing ?
By the way, i see, that messaging is very powerful system in win - do you know links to good introduction to this topic ?
Krystian
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2012-12-03 14:06 +0100 |
| Message-ID | <uu8pb81k073bfhcfm47mnkcnafjv0celrj@4ax.com> |
| In reply to | #4412 |
On Fri, 30 Nov 2012 06:12:55 -0800 (PST), Krystian <softb@softb.pl> wrote: Hello Krystian, > >Thank you - now it works (almost) correctly (I'm really horrified; how huge and extensive >is the problem of programming in win os; and how little i know and understand yet; the manuals are so poor). >The problem is the length of tabs - they are by default 1,25 cm, even if i set them by SetTabStops to 0,5 cm. >What else should i set to achieve shorter tabs spacing ? What exact code did you use? This is the underlying Windows method: http://msdn.microsoft.com/en-us/library/windows/desktop/bb761663%28v=vs.85%29.aspx This also discusses tabstops (you have to select the area before setting the tabs I understand): https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.clipper.visual-objects/x3YQ73e7WD8 and finally, this may help you: METHOD GetTabStops() CLASS RichEdit returns array of tabstops see RichEdit:SetTabStops() I think it's in VO since version 2715 >By the way, i see, that messaging is very powerful system in win - do you know links to good introduction to this topic ? I think the MSDN site; and I learned lots of appliactions using Dispatch by studying samples in this NG, and uploads fellow programmers made. The Wind32 SDK, delivered with VO, help will also help you further. http://msdn.microsoft.com/en-us/library/windows/desktop/ff468861%28v=vs.85%29.aspx Dick
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web