Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

No Rich Text Edit Color Picker?

13 posts in Objects Last posting was on 2007-05-21 18:38:59.0Z
Steven McKenna Posted on 2007-03-17 13:38:38.0Z
From: "Steven McKenna" <techsupport@creativedatatech.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: No Rich Text Edit Color Picker?
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 164.51.156.8
X-Original-NNTP-Posting-Host: 164.51.156.8
Message-ID: <45fbef5e$1@forums-1-dub>
Date: 17 Mar 2007 05:38:38 -0800
X-Trace: forums-1-dub 1174138718 164.51.156.8 (17 Mar 2007 05:38:38 -0800)
X-Original-Trace: 17 Mar 2007 05:38:38 -0800, 164.51.156.8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9285
Article PK: 736459

Does anyone know where the color picker is on the RTE toolbar? See the
screen shot below where I put together a window in PowerBuilder 10.5.1,
build 6565 with an RTE control on it.
http://www.creativedatatech.com/downloads/rtf_demo.jpg

Thanks!
=Steve=


Bruce Armstrong [TeamSybase] Posted on 2007-03-17 14:32:32.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: No Rich Text Edit Color Picker?
Organization: TeamSybase
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com>
References: <45fbef5e$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 12.198.167.34
X-Original-NNTP-Posting-Host: 12.198.167.34
Date: 17 Mar 2007 06:32:32 -0800
X-Trace: forums-1-dub 1174141952 12.198.167.34 (17 Mar 2007 06:32:32 -0800)
X-Original-Trace: 17 Mar 2007 06:32:32 -0800, 12.198.167.34
Lines: 18
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9287
Article PK: 736445

In 10.5 and beyond, the control is implemented using a different
underlying third-party control. The color picker on the toolbar is
one of the differences between the controls. That is, no longer
available AFAIK.

On 17 Mar 2007 05:38:38 -0800, "Steven McKenna"

<techsupport@creativedatatech.com> wrote:

>Does anyone know where the color picker is on the RTE toolbar? See the
>screen shot below where I put together a window in PowerBuilder 10.5.1,
>build 6565 with an RTE control on it.
>http://www.creativedatatech.com/downloads/rtf_demo.jpg
>
>Thanks!
> =Steve=
>


Steven McKenna Posted on 2007-03-17 14:57:33.0Z
From: "Steven McKenna" <techsupport@creativedatatech.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com>
Subject: Re: No Rich Text Edit Color Picker?
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 164.51.156.8
X-Original-NNTP-Posting-Host: 164.51.156.8
Message-ID: <45fc01dd$1@forums-1-dub>
Date: 17 Mar 2007 06:57:33 -0800
X-Trace: forums-1-dub 1174143453 164.51.156.8 (17 Mar 2007 06:57:33 -0800)
X-Original-Trace: 17 Mar 2007 06:57:33 -0800, 164.51.156.8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9289
Article PK: 736450

OK, that's fair. I think I'll just provide the users a button that says
"Edit in Microsoft Word", and it will select all the current contents and
copy to the Clipboard and then launch Word and paste it into a new document.
They will just have to copy the entire document and re-paste it into the RTE
when they are done. This would only be required for advanced editing needs
(normally they will use the RTE editor).
Just out of curiosity, is there a hook or handle to the underlying 3rd party
RTE control? Maybe using a published API, I can get at the selected text and
change the foreground properties myself, and provide the color-picker
drop-down on the window myself? I know it's a stretch, but I thought it
would be worth asking. The users who have tested out this new window with
the RTE really like it, but they are citing this as the one missing
"feature".
=Steve=

"Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>

wrote in message news:ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com...
>
> In 10.5 and beyond, the control is implemented using a different
> underlying third-party control. The color picker on the toolbar is
> one of the differences between the controls. That is, no longer
> available AFAIK.
>
> On 17 Mar 2007 05:38:38 -0800, "Steven McKenna"
> <techsupport@creativedatatech.com> wrote:
>
>>Does anyone know where the color picker is on the RTE toolbar? See the
>>screen shot below where I put together a window in PowerBuilder 10.5.1,
>>build 6565 with an RTE control on it.
>>http://www.creativedatatech.com/downloads/rtf_demo.jpg
>>
>>Thanks!
>> =Steve=
>>
>


Bruce Armstrong [TeamSybase] Posted on 2007-03-18 03:54:03.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: No Rich Text Edit Color Picker?
Organization: TeamSybase
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com>
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
X-Original-NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
Date: 17 Mar 2007 19:54:03 -0800
X-Trace: forums-1-dub 1174190043 68.190.226.38 (17 Mar 2007 19:54:03 -0800)
X-Original-Trace: 17 Mar 2007 19:54:03 -0800, 68-190-226-38.static.lsan.ca.charter.com
Lines: 19
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9291
Article PK: 736446

Well, you can run Windows Spy on the control and get the underlying
class name, and then use that to get a handle to the control. I've
used that to send some messages to the control. However, the API
isn't published anymore. There used to be a C++ API, but the vendor
dropped that due to lack of interest sometime before Sybase adopted
the control.

On 17 Mar 2007 06:57:33 -0800, "Steven McKenna"

<techsupport@creativedatatech.com> wrote:

>Just out of curiosity, is there a hook or handle to the underlying 3rd party
>RTE control? Maybe using a published API, I can get at the selected text and
>change the foreground properties myself, and provide the color-picker
>drop-down on the window myself? I know it's a stretch, but I thought it
>would be worth asking. The users who have tested out this new window with
>the RTE really like it, but they are citing this as the one missing
>"feature".


Steven McKenna Posted on 2007-03-19 11:11:22.0Z
From: "Steven McKenna" <techsupport@creativedatatech.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub> <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com>
Subject: Re: No Rich Text Edit Color Picker?
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 164.51.156.8
X-Original-NNTP-Posting-Host: 164.51.156.8
Message-ID: <45fe6fda$1@forums-1-dub>
Date: 19 Mar 2007 03:11:22 -0800
X-Trace: forums-1-dub 1174302682 164.51.156.8 (19 Mar 2007 03:11:22 -0800)
X-Original-Trace: 19 Mar 2007 03:11:22 -0800, 164.51.156.8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9292
Article PK: 736453

Bruce,
When you were doing your testing of WinterTree's WS Spell control in the
latest PowerBuilder 6.5.1, did you also make sure it worked fine with the
RTE control? I am a little concerned about what Phillip Salgannik said
below (not that I know that your RTE is a 3rd party vendor control)...
"There is one caveat you have to be aware off with WSpell. You HAVE to host
it on a PowerBuilder window directly, meaning you can't have an ole
userobject wrapper for it."
=Steve=

"Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>

wrote in message news:rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com...
>
> Well, you can run Windows Spy on the control and get the underlying
> class name, and then use that to get a handle to the control. I've
> used that to send some messages to the control. However, the API
> isn't published anymore. There used to be a C++ API, but the vendor
> dropped that due to lack of interest sometime before Sybase adopted
> the control.
>
> On 17 Mar 2007 06:57:33 -0800, "Steven McKenna"
> <techsupport@creativedatatech.com> wrote:
>
>>Just out of curiosity, is there a hook or handle to the underlying 3rd
>>party
>>RTE control? Maybe using a published API, I can get at the selected text
>>and
>>change the foreground properties myself, and provide the color-picker
>>drop-down on the window myself? I know it's a stretch, but I thought it
>>would be worth asking. The users who have tested out this new window with
>>the RTE really like it, but they are citing this as the one missing
>>"feature".
>


Philip Salgannik Posted on 2007-03-19 11:57:43.0Z
From: "Philip Salgannik" <philemaxNOSPAM@comcast.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub> <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com> <45fe6fda$1@forums-1-dub>
Subject: Re: No Rich Text Edit Color Picker?
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: c-24-34-73-19.hsd1.ma.comcast.net
X-Original-NNTP-Posting-Host: c-24-34-73-19.hsd1.ma.comcast.net
Message-ID: <45fe7ab7$1@forums-1-dub>
Date: 19 Mar 2007 03:57:43 -0800
X-Trace: forums-1-dub 1174305463 24.34.73.19 (19 Mar 2007 03:57:43 -0800)
X-Original-Trace: 19 Mar 2007 03:57:43 -0800, c-24-34-73-19.hsd1.ma.comcast.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9293
Article PK: 736451

I tested it with PB9 and 10...

"Steven McKenna" <techsupport@creativedatatech.com> wrote in message
news:45fe6fda$1@forums-1-dub...
> Bruce,
> When you were doing your testing of WinterTree's WS Spell control in the
> latest PowerBuilder 6.5.1, did you also make sure it worked fine with the
> RTE control? I am a little concerned about what Phillip Salgannik said
> below (not that I know that your RTE is a 3rd party vendor control)...
> "There is one caveat you have to be aware off with WSpell. You HAVE to
> host it on a PowerBuilder window directly, meaning you can't have an ole
> userobject wrapper for it."
>
> =Steve=
>
> "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
> wrote in message news:rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com...
>>
>> Well, you can run Windows Spy on the control and get the underlying
>> class name, and then use that to get a handle to the control. I've
>> used that to send some messages to the control. However, the API
>> isn't published anymore. There used to be a C++ API, but the vendor
>> dropped that due to lack of interest sometime before Sybase adopted
>> the control.
>>
>> On 17 Mar 2007 06:57:33 -0800, "Steven McKenna"
>> <techsupport@creativedatatech.com> wrote:
>>
>>>Just out of curiosity, is there a hook or handle to the underlying 3rd
>>>party
>>>RTE control? Maybe using a published API, I can get at the selected text
>>>and
>>>change the foreground properties myself, and provide the color-picker
>>>drop-down on the window myself? I know it's a stretch, but I thought it
>>>would be worth asking. The users who have tested out this new window with
>>>the RTE really like it, but they are citing this as the one missing
>>>"feature".
>>
>
>


Steven McKenna Posted on 2007-03-19 12:17:52.0Z
From: "Steven McKenna" <techsupport@creativedatatech.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub> <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com> <45fe6fda$1@forums-1-dub> <45fe7ab7$1@forums-1-dub>
Subject: Re: No Rich Text Edit Color Picker?
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 164.51.156.8
X-Original-NNTP-Posting-Host: 164.51.156.8
Message-ID: <45fe7f70$1@forums-1-dub>
Date: 19 Mar 2007 04:17:52 -0800
X-Trace: forums-1-dub 1174306672 164.51.156.8 (19 Mar 2007 04:17:52 -0800)
X-Original-Trace: 19 Mar 2007 04:17:52 -0800, 164.51.156.8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9294
Article PK: 736452

Thanks Phil. This is a relief to hear.

=Steve=

"Philip Salgannik" <philemaxNOSPAM@comcast.net> wrote in message
news:45fe7ab7$1@forums-1-dub...
>I tested it with PB9 and 10...
> "Steven McKenna" <techsupport@creativedatatech.com> wrote in message
> news:45fe6fda$1@forums-1-dub...
>> Bruce,
>> When you were doing your testing of WinterTree's WS Spell control in the
>> latest PowerBuilder 6.5.1, did you also make sure it worked fine with the
>> RTE control? I am a little concerned about what Phillip Salgannik said
>> below (not that I know that your RTE is a 3rd party vendor control)...
>> "There is one caveat you have to be aware off with WSpell. You HAVE to
>> host it on a PowerBuilder window directly, meaning you can't have an ole
>> userobject wrapper for it."
>>
>> =Steve=
>>
>> "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
>> wrote in message news:rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com...
>>>
>>> Well, you can run Windows Spy on the control and get the underlying
>>> class name, and then use that to get a handle to the control. I've
>>> used that to send some messages to the control. However, the API
>>> isn't published anymore. There used to be a C++ API, but the vendor
>>> dropped that due to lack of interest sometime before Sybase adopted
>>> the control.
>>>
>>> On 17 Mar 2007 06:57:33 -0800, "Steven McKenna"
>>> <techsupport@creativedatatech.com> wrote:
>>>
>>>>Just out of curiosity, is there a hook or handle to the underlying 3rd
>>>>party
>>>>RTE control? Maybe using a published API, I can get at the selected text
>>>>and
>>>>change the foreground properties myself, and provide the color-picker
>>>>drop-down on the window myself? I know it's a stretch, but I thought it
>>>>would be worth asking. The users who have tested out this new window
>>>>with
>>>>the RTE really like it, but they are citing this as the one missing
>>>>"feature".
>>>
>>
>>
>
>


Bruce Armstrong [TeamSybase] Posted on 2007-03-19 12:50:41.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: No Rich Text Edit Color Picker?
Organization: TeamSybase
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <t71tv29t7jn0f5pgoleu5lg4hb6ta3vusf@4ax.com>
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub> <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com> <45fe6fda$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
X-Original-NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
Date: 19 Mar 2007 04:50:41 -0800
X-Trace: forums-1-dub 1174308641 68.190.226.38 (19 Mar 2007 04:50:41 -0800)
X-Original-Trace: 19 Mar 2007 04:50:41 -0800, 68-190-226-38.static.lsan.ca.charter.com
Lines: 31
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9295
Article PK: 736456

On 19 Mar 2007 03:11:22 -0800, "Steven McKenna"

<techsupport@creativedatatech.com> wrote:

>Bruce,
> When you were doing your testing of WinterTree's WS Spell control in the
>latest PowerBuilder 6.5.1, did you also make sure it worked fine with the
>RTE control?

The intial 10.5 release. I didn't retest them for 10.5.1.

Yes. That's the only time I use a spell control.

>I am a little concerned about what Phillip Salgannik said
>below (not that I know that your RTE is a 3rd party vendor control)...
>"There is one caveat you have to be aware off with WSpell. You HAVE to host
>it on a PowerBuilder window directly, meaning you can't have an ole
>userobject wrapper for it."
> =Steve=

When I tested the various spell controls (WSpell, VSSPell, and
JRSpell) I put non visual object wrappers around all of them. The
sample code is still available at:

https://powerbuilder.codexchange.sybase.com/files/documents/67/2476/pb10.5newfeatures.zip

Because the properties the spell controls needed were not exposed, I
used some Windows API functions to access them. You could simply use
those properties directly now.


Bruce Armstrong [TeamSybase] Posted on 2007-03-19 12:59:24.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: No Rich Text Edit Color Picker?
Organization: TeamSybase
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <m72tv2dr0fgj2fud1f3adkql67qqs0h17o@4ax.com>
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub> <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com> <45fe6fda$1@forums-1-dub> <t71tv29t7jn0f5pgoleu5lg4hb6ta3vusf@4ax.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
X-Original-NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
Date: 19 Mar 2007 04:59:24 -0800
X-Trace: forums-1-dub 1174309164 68.190.226.38 (19 Mar 2007 04:59:24 -0800)
X-Original-Trace: 19 Mar 2007 04:59:24 -0800, 68-190-226-38.static.lsan.ca.charter.com
Lines: 39
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9296
Article PK: 736455

Correction. I put *visual* object wrappers around all of them. What
I believe Phillip is saying is that you can't put non-visual (e.g.,
OLE) object wrappers around them.

On 19 Mar 2007 04:50:41 -0800, "Bruce Armstrong [TeamSybase]"

<NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:

>
>On 19 Mar 2007 03:11:22 -0800, "Steven McKenna"
><techsupport@creativedatatech.com> wrote:
>
>>Bruce,
>> When you were doing your testing of WinterTree's WS Spell control in the
>>latest PowerBuilder 6.5.1, did you also make sure it worked fine with the
>>RTE control?
>
>The intial 10.5 release. I didn't retest them for 10.5.1.
>
>Yes. That's the only time I use a spell control.
>
>>I am a little concerned about what Phillip Salgannik said
>>below (not that I know that your RTE is a 3rd party vendor control)...
>>"There is one caveat you have to be aware off with WSpell. You HAVE to host
>>it on a PowerBuilder window directly, meaning you can't have an ole
>>userobject wrapper for it."
>> =Steve=
>
>When I tested the various spell controls (WSpell, VSSPell, and
>JRSpell) I put non visual object wrappers around all of them. The
>sample code is still available at:
>
>https://powerbuilder.codexchange.sybase.com/files/documents/67/2476/pb10.5newfeatures.zip
>
>Because the properties the spell controls needed were not exposed, I
>used some Windows API functions to access them. You could simply use
>those properties directly now.
>


Steve McKenna Posted on 2007-05-12 17:16:48.0Z
Message-ID: <4645F67A.5090502@nospam.com>
From: Steve McKenna <nospam@nospam.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
To: NOCANSPAM_bruce.armstrong@teamsybase.com
Subject: Re: No Rich Text Edit Color Picker?
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub> <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com>
In-Reply-To: <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 164.51.156.8
X-Original-NNTP-Posting-Host: 164.51.156.8
Date: 12 May 2007 10:16:48 -0700
X-Trace: forums-1-dub 1178990208 164.51.156.8 (12 May 2007 10:16:48 -0700)
X-Original-Trace: 12 May 2007 10:16:48 -0700, 164.51.156.8
Lines: 103
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9351
Article PK: 736510

Well, I finally got around to solving the problem of PowerBuilder's RTE
Control not having a ColorPicker on the toolbar. I went ahead and
purchased a $29 Color Picker control from www.nicefeather.com. That was
the easy part.
The hard part was actually accomplishing the changing of the font color
in the RTE control to the selected color that the user selected in the
Color Picker. I decided to go ahead and use OLE automation to Microsoft
Word to accomplish this small feat (see code below). FYI, the MyWordObj
is an OLEObject that is an instance variable of the window, and on my
CloseQuery event, I am destroying the object.
Hope this helps other people out. It seems to be working fine for me so far.
There is one gotcha. Notice that the line near the end that reads
MyWordObj.Quit() has been commented out. This was causing a nasty little
run time error 398 "Client Site not available" when the user closed the
window. It had "Color Picker ActiveX Control" in the title bar, so it is
some bad interaction between the Color Picker control and the Microsoft
Word OLE object. Because of this, it leaves the WINWORD.EXE process
running, but it doesn't seem to cause any harm, and the very next time
the user starts and stops Microsoft Word, it goes away. It is a very
small price to pay to have the Color Picker for my users. However, if
anyone knows how to get around the dreaded "Client Site not available"
error, it would make this a home-run solution to post for everyone.

STRING ls_RTF
INTEGER li_Result
STRING ls_Word
LONG ll_Row, ll_Sequence, ll_Index

IF (rte_activity_note.SelectedTextLength = 0) THEN
MessageBox("Problem:","You must first Highlight / Select some text to
change the font color!",Information!)
RETURN
END IF

SetPointer(HourGlass!)
rte_activity_note.SetRedraw(FALSE)

// Copy the selected text (with Rich Text Formatting) onto the Clipboard...
rte_activity_note.Copy()

// Launch Microsoft Word...
// Create the Word OLE Object if needed...
IF (NOT ISVALID(MyWordObj)) THEN
MyWordObj = CREATE OLEObject
END IF

// Start an OLE Session...
// First try to connect to an existing running instance of Word XP...
li_Result = MyWordObj.ConnectToObject("","word.application.8")
IF (li_Result <> 0) THEN
li_Result = MyWordObj.ConnectToNewObject("word.application.8")
IF (li_Result <> 0) THEN
SetPointer(Arrow!)
MessageBox("Problem:","Could not locate Microsoft Word!",StopSign!)
RETURN
END IF
END IF

// Create a new blank document...
MyWordObj.Documents.Add()

// Paste the Rich Text into Microsoft Word, Change the color of the
text, and copy the new text to the clipboard, and close the document...
MyWordObj.Selection.PasteAndFormat(0)
MyWordObj.Selection.MoveLeft(1, 1)
MyWordObj.Selection.HomeKey(5, 1)
MyWordObj.Selection.Font.Color = ole_colorpicker.Object.Value // 3rd
party color picker control.
MyWordObj.Selection.Copy
MyWordObj.ActiveDocument.Close(0)

// Paste the updated Rich Text back into the Rich Text Edit control...
rte_activity_note.Paste()
rte_activity_note.SetRedraw(TRUE)

// Quit Microsoft Word... (commented out due to runtime error 398:
Client Site not available)
//MyWordObj.Quit()
MyWordObj.DisconnectObject()

SetPointer(Arrow!)

=Steve=

Bruce Armstrong [TeamSybase] wrote:
> Well, you can run Windows Spy on the control and get the underlying
> class name, and then use that to get a handle to the control. I've
> used that to send some messages to the control. However, the API
> isn't published anymore. There used to be a C++ API, but the vendor
> dropped that due to lack of interest sometime before Sybase adopted
> the control.
>
> On 17 Mar 2007 06:57:33 -0800, "Steven McKenna"
> <techsupport@creativedatatech.com> wrote:
>
>> Just out of curiosity, is there a hook or handle to the underlying 3rd party
>> RTE control? Maybe using a published API, I can get at the selected text and
>> change the foreground properties myself, and provide the color-picker
>> drop-down on the window myself? I know it's a stretch, but I thought it
>> would be worth asking. The users who have tested out this new window with
>> the RTE really like it, but they are citing this as the one missing
>> "feature".
>


Steve McKenna Posted on 2007-05-12 18:17:18.0Z
Message-ID: <464604B2.3030104@nospam.com>
From: Steve McKenna <nospam@nospam.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
To: Steve McKenna <nospam@nospam.com>
CC: NOCANSPAM_bruce.armstrong@teamsybase.com
Subject: Re: No Rich Text Edit Color Picker?
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub> <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com> <4645F67A.5090502@nospam.com>
In-Reply-To: <4645F67A.5090502@nospam.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 164.51.156.8
X-Original-NNTP-Posting-Host: 164.51.156.8
Date: 12 May 2007 11:17:18 -0700
X-Trace: forums-1-dub 1178993838 164.51.156.8 (12 May 2007 11:17:18 -0700)
X-Original-Trace: 12 May 2007 11:17:18 -0700, 164.51.156.8
Lines: 116
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9352
Article PK: 736511

OK, I figured out how to get rid of the dreaded runtime error 398
"Client Site not available". After reading some posts on this error, I
put the following code into the window's close event, and it fixed it:
DO WHILE Yield()
LOOP

This allowed me to un-comment the MyWordObj.Quit() which means that now
the code doesn't leave a copy of WINWORD.EXE running in memory.
I'm all smiles! :)
=Steve=

Steve McKenna wrote:
> Well, I finally got around to solving the problem of PowerBuilder's RTE
> Control not having a ColorPicker on the toolbar. I went ahead and
> purchased a $29 Color Picker control from www.nicefeather.com. That was
> the easy part.
> The hard part was actually accomplishing the changing of the font color
> in the RTE control to the selected color that the user selected in the
> Color Picker. I decided to go ahead and use OLE automation to Microsoft
> Word to accomplish this small feat (see code below). FYI, the MyWordObj
> is an OLEObject that is an instance variable of the window, and on my
> CloseQuery event, I am destroying the object.
> Hope this helps other people out. It seems to be working fine for me so
> far.
> There is one gotcha. Notice that the line near the end that reads
> MyWordObj.Quit() has been commented out. This was causing a nasty little
> run time error 398 "Client Site not available" when the user closed the
> window. It had "Color Picker ActiveX Control" in the title bar, so it is
> some bad interaction between the Color Picker control and the Microsoft
> Word OLE object. Because of this, it leaves the WINWORD.EXE process
> running, but it doesn't seem to cause any harm, and the very next time
> the user starts and stops Microsoft Word, it goes away. It is a very
> small price to pay to have the Color Picker for my users. However, if
> anyone knows how to get around the dreaded "Client Site not available"
> error, it would make this a home-run solution to post for everyone.
>
> STRING ls_RTF
> INTEGER li_Result
> STRING ls_Word
> LONG ll_Row, ll_Sequence, ll_Index
>
> IF (rte_activity_note.SelectedTextLength = 0) THEN
> MessageBox("Problem:","You must first Highlight / Select some text
> to change the font color!",Information!)
> RETURN
> END IF
>
> SetPointer(HourGlass!)
> rte_activity_note.SetRedraw(FALSE)
>
> // Copy the selected text (with Rich Text Formatting) onto the Clipboard...
> rte_activity_note.Copy()
>
> // Launch Microsoft Word...
> // Create the Word OLE Object if needed...
> IF (NOT ISVALID(MyWordObj)) THEN
> MyWordObj = CREATE OLEObject
> END IF
>
> // Start an OLE Session...
> // First try to connect to an existing running instance of Word XP...
> li_Result = MyWordObj.ConnectToObject("","word.application.8")
> IF (li_Result <> 0) THEN
> li_Result = MyWordObj.ConnectToNewObject("word.application.8")
> IF (li_Result <> 0) THEN
> SetPointer(Arrow!)
> MessageBox("Problem:","Could not locate Microsoft Word!",StopSign!)
> RETURN
> END IF
> END IF
>
> // Create a new blank document...
> MyWordObj.Documents.Add()
>
> // Paste the Rich Text into Microsoft Word, Change the color of the
> text, and copy the new text to the clipboard, and close the document...
> MyWordObj.Selection.PasteAndFormat(0)
> MyWordObj.Selection.MoveLeft(1, 1)
> MyWordObj.Selection.HomeKey(5, 1)
> MyWordObj.Selection.Font.Color = ole_colorpicker.Object.Value // 3rd
> party color picker control.
> MyWordObj.Selection.Copy
> MyWordObj.ActiveDocument.Close(0)
>
> // Paste the updated Rich Text back into the Rich Text Edit control...
> rte_activity_note.Paste()
> rte_activity_note.SetRedraw(TRUE)
>
> // Quit Microsoft Word... (commented out due to runtime error 398:
> Client Site not available)
> //MyWordObj.Quit()
> MyWordObj.DisconnectObject()
>
> SetPointer(Arrow!)
>
> =Steve=
>
> Bruce Armstrong [TeamSybase] wrote:
>> Well, you can run Windows Spy on the control and get the underlying
>> class name, and then use that to get a handle to the control. I've
>> used that to send some messages to the control. However, the API
>> isn't published anymore. There used to be a C++ API, but the vendor
>> dropped that due to lack of interest sometime before Sybase adopted
>> the control.
>>
>> On 17 Mar 2007 06:57:33 -0800, "Steven McKenna"
>> <techsupport@creativedatatech.com> wrote:
>>
>>> Just out of curiosity, is there a hook or handle to the underlying
>>> 3rd party RTE control? Maybe using a published API, I can get at the
>>> selected text and change the foreground properties myself, and
>>> provide the color-picker drop-down on the window myself? I know it's
>>> a stretch, but I thought it would be worth asking. The users who have
>>> tested out this new window with the RTE really like it, but they are
>>> citing this as the one missing "feature".
>>


mark.bisson Posted on 2007-05-21 18:38:59.0Z
From: mark.bisson@mckesson.com
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: No Rich Text Edit Color Picker?
Date: 21 May 2007 11:38:59 -0700
Organization: http://groups.google.com
Lines: 128
Message-ID: <1179772739.227326.145450@u36g2000prd.googlegroups.com>
References: <45fbef5e$1@forums-1-dub> <ruunv2psvti6bou7f8eq68d24ujrh1k3sq@4ax.com> <45fc01dd$1@forums-1-dub> <rrdpv2ds963bbp0grvq16hn2r2qpbbni7a@4ax.com> <4645F67A.5090502@nospam.com> <464604B2.3030104@nospam.com>
NNTP-Posting-Host: 143.112.32.4
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1179772753 3080 127.0.0.1 (21 May 2007 18:39:13 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 21 May 2007 18:39:13 +0000 (UTC)
In-Reply-To: <464604B2.3030104@nospam.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 dbqproxy01 (NetCache NetApp/5.6.2D17), 1.1 dbqproxy01 (NetCache NetApp/5.6.2D17)
Complaints-To: groups-abuse@google.com
Injection-Info: u36g2000prd.googlegroups.com; posting-host=143.112.32.4; posting-account=wVAVFQ0AAACZjXsgSbnUsv2M8vicONp_
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!u36g2000prd.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9363
Article PK: 736525


On May 12, 2:17 pm, Steve McKenna <nos...@nospam.com> wrote:
> OK, I figured out how to get rid of the dreaded runtime error 398
> "Client Site not available". After reading some posts on this error, I
> put the following code into the window's close event, and it fixed it:
> DO WHILE Yield()
> LOOP
>
> This allowed me to un-comment the MyWordObj.Quit() which means that now
> the code doesn't leave a copy of WINWORD.EXE running in memory.
> I'm all smiles! :)
> =Steve=
>
>
>
> Steve McKenna wrote:
> > Well, I finally got around to solving the problem of PowerBuilder's RTE
> > Control not having a ColorPicker on the toolbar. I went ahead and
> > purchased a $29 Color Picker control fromwww.nicefeather.com. That was
> > the easy part.
> > The hard part was actually accomplishing the changing of the font color
> > in the RTE control to the selected color that the user selected in the
> > Color Picker. I decided to go ahead and use OLE automation to Microsoft
> > Word to accomplish this small feat (see code below). FYI, the MyWordObj
> > is an OLEObject that is an instance variable of the window, and on my
> > CloseQuery event, I am destroying the object.
> > Hope this helps other people out. It seems to be working fine for me so
> > far.
> > There is one gotcha. Notice that the line near the end that reads
> > MyWordObj.Quit() has been commented out. This was causing a nasty little
> > run time error 398 "Client Site not available" when the user closed the
> > window. It had "Color Picker ActiveX Control" in the title bar, so it is
> > some bad interaction between the Color Picker control and the Microsoft
> > Word OLE object. Because of this, it leaves the WINWORD.EXE process
> > running, but it doesn't seem to cause any harm, and the very next time
> > the user starts and stops Microsoft Word, it goes away. It is a very
> > small price to pay to have the Color Picker for my users. However, if
> > anyone knows how to get around the dreaded "Client Site not available"
> > error, it would make this a home-run solution to post for everyone.
>
> > STRING ls_RTF
> > INTEGER li_Result
> > STRING ls_Word
> > LONG ll_Row, ll_Sequence, ll_Index
>
> > IF (rte_activity_note.SelectedTextLength = 0) THEN
> > MessageBox("Problem:","You must first Highlight / Select some text
> > to change the font color!",Information!)
> > RETURN
> > END IF
>
> > SetPointer(HourGlass!)
> > rte_activity_note.SetRedraw(FALSE)
>
> > // Copy the selected text (with Rich Text Formatting) onto the Clipboard...
> > rte_activity_note.Copy()
>
> > // Launch Microsoft Word...
> > // Create the Word OLE Object if needed...
> > IF (NOT ISVALID(MyWordObj)) THEN
> > MyWordObj = CREATE OLEObject
> > END IF
>
> > // Start an OLE Session...
> > // First try to connect to an existing running instance of Word XP...
> > li_Result = MyWordObj.ConnectToObject("","word.application.8")
> > IF (li_Result <> 0) THEN
> > li_Result = MyWordObj.ConnectToNewObject("word.application.8")
> > IF (li_Result <> 0) THEN
> > SetPointer(Arrow!)
> > MessageBox("Problem:","Could not locate Microsoft Word!",StopSign!)
> > RETURN
> > END IF
> > END IF
>
> > // Create a new blank document...
> > MyWordObj.Documents.Add()
>
> > // Paste the Rich Text into Microsoft Word, Change the color of the
> > text, and copy the new text to the clipboard, and close the document...
> > MyWordObj.Selection.PasteAndFormat(0)
> > MyWordObj.Selection.MoveLeft(1, 1)
> > MyWordObj.Selection.HomeKey(5, 1)
> > MyWordObj.Selection.Font.Color = ole_colorpicker.Object.Value // 3rd
> > party color picker control.
> > MyWordObj.Selection.Copy
> > MyWordObj.ActiveDocument.Close(0)
>
> > // Paste the updated Rich Text back into the Rich Text Edit control...
> > rte_activity_note.Paste()
> > rte_activity_note.SetRedraw(TRUE)
>
> > // Quit Microsoft Word... (commented out due to runtime error 398:
> > Client Site not available)
> > //MyWordObj.Quit()
> > MyWordObj.DisconnectObject()
>
> > SetPointer(Arrow!)
>
> > =Steve=
>
> > Bruce Armstrong [TeamSybase] wrote:
> >> Well, you can run Windows Spy on the control and get the underlying
> >> class name, and then use that to get a handle to the control. I've
> >> used that to send some messages to the control. However, the API
> >> isn't published anymore. There used to be a C++ API, but the vendor
> >> dropped that due to lack of interest sometime before Sybase adopted
> >> the control.
>
> >> On 17 Mar 2007 06:57:33 -0800, "Steven McKenna"
> >> <techsupp...@creativedatatech.com> wrote:
>
> >>> Just out of curiosity, is there a hook or handle to the underlying
> >>> 3rd party RTE control? Maybe using a published API, I can get at the
> >>> selected text and change the foreground properties myself, and
> >>> provide the color-picker drop-down on the window myself? I know it's
> >>> a stretch, but I thought it would be worth asking. The users who have
> >>> tested out this new window with the RTE really like it, but they are
> >>> citing this as the one missing "feature".- Hide quoted text -
>
> - Show quoted text -

Side note, even though you've found a work around.

If you highlight the text in your RTE control, and right mouse click
and select properties, it will bring up a font tabpage that will allow
you to change the color of the text. Of course, this means you have
to allow the popup menu, but there is a way to do it.