Keith,

I'm trying to avoid using process vars, on one hand, and a separate var for
the button image, on the other. Pushing the envelope for totally portable
code on forms, I guess. The stuff I'm doing is very simple (things like
plus signs, the small triangular arrows in round buttons, that sort of
thing. The SVG is fast enough - I just want a way to feed it directly into
the button object.

But I think there's nothing in 4D at the moment to support this sort of
thing.

On Tue, Aug 22, 2017 at 3:28 PM, Keith Culotta via 4D_Tech <
[email protected]> wrote:

> This got somewhere, but "pic" has to be a process variable, and can't be
> cleared (pic:=pic*0).
>
> $svg:=SVG_New
> SVG_New_rect ($svg;1;1;4;4)
> pic:=SVG_Export_to_picture ($svg)
> $format:="1;1;pic;0"
> OBJECT SET FORMAT(OBJECT Get pointer(Object named;"Button")->;$format)
> SVG_CLEAR ($svg)
>
> Keith - CDI
>
> > On Aug 22, 2017, at 4:56 PM, Kirk Brooks via 4D_Tech <
> [email protected]> wrote:
> >
> > Hi folks,
> >
> > I'm playing around with some SVG to create simple button graphics and
> > icons.
> >
> > How can I set an SVG object as the picture source for a button without
> > writing it to a file or saving it in a process var?
> >
> > Many thanks
> >
> > --
> > Kirk Brooks
> > San Francisco, CA
> > =======================
> >
> > *The only thing necessary for the triumph of evil is for good men to do
> > nothing.*
> >
> > *- Edmund Burke*
> > **********************************************************************
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: http://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:[email protected]
> > **********************************************************************
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************
>



-- 
Kirk Brooks
San Francisco, CA
=======================

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to