Tom, or whoever is responsible that this codesnippet works, please
check the syntax before posting it online.
I quickly looked over it to see how Paolo managed to draw on a dialog,
but found this line
<code>
oPaintListener = CreateUnoListener("ThisDialog_",
"com.sun.star.awt.XPaintListener"
</code>
There is no closing parenthesis.
->
http://codesnippets.services.openoffice.org/Office/Office.DrawingOnDialogs.snip
Also do check the comments, because there were spelling errors too. (I
know this happens easily, but remember that these snippets should be
good exercises for others out there.
On Fri, 11 Mar 2005 15:56:37 +0100, J�rgen Schmidt
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> yep, the awt API'S was deprecated in the past but in fact of a missing
> alternative we removed the deprecated flag. But you should not expect
> too much of this API.
>
> - Juergen
>
>
> Paolo Mantovani wrote:
> > Hi Laurent,
> >
> > Alle 12:20, venerd� 11 marzo 2005, Laurent Godard ha scritto:
> >
> >>Hi paolo
> >>
> >>
> >>>After some testing I've learned how to draw some nice shapes :-) on a Uno
> >>>Dialog and I've summarized my testing in the attached code snippet
> >>
> >>That's great !!!
> >>I just tested and it offers nice ideas
> >>
> >>As i didn't dig in this part of the api,
> >>do you think there is a way to
> >>modify the shap of the window itself
> >
> >
> > I must admit that awt API's are quite obscure to me, and it's difficult to
> > say
> > what can be done and what cannot.
> >
> > Anyway, if I well remember, when I was playing with VB, peoples used some
> > window API's to create shaped buttons or forms.
> >
> > The trick was something like this:
> > - create a non rectangular region on the screen (Hwnd = 0) using intesection
> > or union or elliptic regions
> > - set the region to a form (or control) using the API call setWindowRegion
> > (or
> > something similar)
> >
> > Now, In the OOo API's there should be something similar because you can
> > create
> > and manipulate regions, for example:
> >
> > oRegion = oDlg.Peer.Toolkit.createRegion
> > Dim aRect As New com.sun.star.awt.Rectangle
> > aRect.Width = 100
> > aRect.Height = 100
> >
> > oRegion.unionRectangle(aRect)
> >
> > Unfortunately I've no idea if you can create a region from the screen and if
> > you can set a region to a specified window, but maybe it worth some further
> > investigations on this track.
> >
> > ciao
> > Paolo M.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Best Regards
Christian Junker
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]