----boundary-LibPST-iamunique-2131262089_-_-
Content-type: text/plain
Bernhard,
I can not really explain the inner workings. I put that together on a
trial and error basis.
Even reading the Controllers.targetPath description was still not clear
to me.
What I needed was to be able to have the caret remain in the text while
I clicked
on a button in a form to insert a character into the text at the caret.
The solution presented works
so I stuck with it.
-Doug
On 9/17/2010 7:08 AM, Treutwein Bernhard wrote:
> Dear Doug,
>
> having encountered recently a similar problem, when working with folds,
> I digged through the BlackBox mailing List and found your solution,
> which you posted in March:
>
>> -----Original Message-----
>> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy>> Douglas G. Danforth
>> Sent: Tuesday, March 02, 2010 5:20 AM
> [...]
>> PROCEDURE SetFocus;
>> VAR res: INTEGER; win: HostWindows.Window;
>> BEGIN
>> win := HostWindows.dir.Focus(Controllers.targetPath);
>> res := WinApi.SetFocus(win.wnd);
>> res := WinApi.UpdateWindow(win.wnd)
>> END SetFocus;
> I am just curious: Can you explain the inner workings of it to me?
>
> Below is my solution, which does not even require changing any of the
> BlackBox modules, it requires only a little addition to Std/Rsrc/Fold.odc,
> which is included below as StdCoded text.
> --
> Bernhard
----boundary-LibPST-iamunique-2131262089_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwICAgQmVybmhhcmQsXHBhcg0KSSBjYW4gb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