Welcome! Log In Create A New Profile

Advanced

Passing a line break to an activex control

Posted by Mark Irwin.pcs.crosspost 
Mark Irwin.pcs.crosspost
Passing a line break to an activex control
October 07, 2008 11:03AM
Hi

I am having a lot of trouble sending a vbCrLf for a line break, to a Codejock extreme calendar control

here is my code

PROCEDURE LP_CalGetItem(lpautParams=AX_Calendar>>GetItemTextParams)

IF lpautParams>>Item=1 THEN

lpautParams>>Text="Ref. No: "+lpautParams>>ViewEvent>>Event>>Id+vbCrlf+lpautParams>>ViewEvent>>Event>>Subject

ELSE IF lpautParams>>Item=2 THEN

lpautParams>>Text="Location: "+lpautParams>>ViewEvent>>Event>>Location+lpautParams>>Text

ELSE IF lpautParams>>Item = 64 THEN

lpautParams>>Text = "(" + lpautParams>>ViewEvent>>Even>>Location +...

lpautParams>>ViewEvent>>Event>>Subject +...

" [" + lpautParams>>ViewEvent>>Event>>Id + "]"

END

If put the vbCrLf code in as above Windev will not compile it as it does not recognise it as a constant. If I use quotes then it comes out as text. I have tried all sorts of combinations. I tried Charact(13) + Charact(10) but that also came out as text. Are there any esc characters I can put around the quotes so the activex control will ignore them? Is it possible to make the vbCrLf a constant so windev does not reject it without quotes?
Any ideas would be appreciated.

Regards
Mark

Message forwarded from pcsoft.us.windev
BLS.pcs.crosspost
Re: Passing a line break to an activex control
October 07, 2008 11:56AM
Mark Irwin schrieb:
> Hi
>
> I am having a lot of trouble sending a vbCrLf for a line break, to a Codejock extreme calendar control
>
> here is my code
>
> PROCEDURE LP_CalGetItem(lpautParams=AX_Calendar>>GetItemTextParams)
>
> IF lpautParams>>Item=1 THEN
>
> lpautParams>>Text="Ref. No: "+lpautParams>>ViewEvent>>Event>>Id+vbCrlf+lpautParams>>ViewEvent>>Event>>Subject
>
> ELSE IF lpautParams>>Item=2 THEN
>
> lpautParams>>Text="Location: "+lpautParams>>ViewEvent>>Event>>Location+lpautParams>>Text
>
> ELSE IF lpautParams>>Item = 64 THEN
>
> lpautParams>>Text = "(" + lpautParams>>ViewEvent>>Even>>Location +...
>
> lpautParams>>ViewEvent>>Event>>Subject +...
>
> " [" + lpautParams>>ViewEvent>>Event>>Id + "]"
>
> END
>
> If put the vbCrLf code in as above Windev will not compile it as it does not recognise it as a constant. If I use quotes then it comes out as text. I have tried all sorts of combinations. I tried Charact(13) + Charact(10) but that also came out as text. Are there any esc characters I can put around the quotes so the activex control will ignore them? Is it possible to make the vbCrLf a constant so windev does not reject it without quotes?
> Any ideas would be appreciated.
>
> Regards
> Mark
>

Try
CR instead of vbCrLf
NOT "CR" simply CR smiling smiley

bjoern
Message forwarded from pcsoft.us.windev
BLS.pcs.crosspost
Re: Passing a line break to an activex control
October 07, 2008 11:58AM
Mark Irwin schrieb:
> Hi
>
> I am having a lot of trouble sending a vbCrLf for a line break, to a Codejock extreme calendar control
>
> here is my code
>
> PROCEDURE LP_CalGetItem(lpautParams=AX_Calendar>>GetItemTextParams)
>
> IF lpautParams>>Item=1 THEN
>
> lpautParams>>Text="Ref. No: "+lpautParams>>ViewEvent>>Event>>Id+vbCrlf+lpautParams>>ViewEvent>>Event>>Subject
>
> ELSE IF lpautParams>>Item=2 THEN
>
> lpautParams>>Text="Location: "+lpautParams>>ViewEvent>>Event>>Location+lpautParams>>Text
>
> ELSE IF lpautParams>>Item = 64 THEN
>
> lpautParams>>Text = "(" + lpautParams>>ViewEvent>>Even>>Location +...
>
> lpautParams>>ViewEvent>>Event>>Subject +...
>
> " [" + lpautParams>>ViewEvent>>Event>>Id + "]"
>
> END
>
> If put the vbCrLf code in as above Windev will not compile it as it does not recognise it as a constant. If I use quotes then it comes out as text. I have tried all sorts of combinations. I tried Charact(13) + Charact(10) but that also came out as text. Are there any esc characters I can put around the quotes so the activex control will ignore them? Is it possible to make the vbCrLf a constant so windev does not reject it without quotes?
> Any ideas would be appreciated.
>
> Regards
> Mark
>
Jeez, not enough coffee ... use CRLF instead of vbCrlf
sorry, B
Message forwarded from pcsoft.us.windev
Mark Irwin.pcs.crosspost
Re: Passing a line break to an activex control
October 07, 2008 02:21PM
Hi bjoern,

Thanks for your response, but I have tried that to no avail. I think it somehow has to be passed as an object of the microsoft.visualbasic namespace. I have tried a few variations but no luck.

regards
Mark


Message forwarded from pcsoft.us.windev
Peter Holemans
Re: Passing a line break to an activex control
October 07, 2008 02:53PM
Have you tried:
Charact(13)
or
Charact(13)+Charact(10)
which is the same as
CR
or
CRLF

Cheers,
BLS.pcs.crosspost
Re: Passing a line break to an activex control
October 07, 2008 03:14PM
Mark Irwin schrieb:
> Hi bjoern,
>
> Thanks for your response, but I have tried that to no avail. I think it somehow has to be passed as an object of the microsoft.visualbasic namespace. I have tried a few variations but no luck.
>
> regards
> Mark
>
>
I doubt that.
Do you have some short VB sample snippets regarding this topic?

Bjoern
Message forwarded from pcsoft.us.windev
BLS.pcs.crosspost
Re: Passing a line break to an activex control
October 08, 2008 09:52AM
Mark Irwin schrieb:
> Hi,
>
> Here is a vb code snippet.
> If Params.Item = xtpCalendarItemText_EventToolTipText Then
> Params.Text = "ID = [" & Params.ViewEvent.Event.Id & "] " & vbCrLf & Params.ViewEvent.Event.Subject & _
> vbCrLf & Params.ViewEvent.Event.Location & vbCrLf & Params.ViewEvent.Event.Body
> End If
> The funny thing is the CRLF will work with the createEvent Method
>
> Regards
> Mark
>
Hi Mark,
Do you get an error message ?
However, the problem is located elsewhere.

PROCEDURE LP_CalGetItem(lpautParams=AX_Calendar>>GetItemTextParams)
1)please show the VB example-code, or even better the documentation if
possible.

2)
ActiveXEvent, should be similar to :
ActiveXEvénement("LP_CalGetItem", CodeJockCalCtrl, "CalGetItem")
please show me your code.

3) Where do you place the ActiveXEvent() stuff ? Should be the window
init section!

Just a suggestion :
for instance : Start with
Params.Text = "ID = [" + Params.ViewEvent.Event.Id
compile and run
if not okay then for example
Params.Text = "ID = [" + NumToString(Params.ViewEvent.Event.Id)
else
Params.Text = "ID = [" + Params.ViewEvent.Event.Id + ...
"] " + CRLF + Params.ViewEvent.Event.Subject
okay then compile and run
etc.

Sorry that's it for the moment,
Bjoern



Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: