<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 17 Aug 2022 at 13:19, Benoit Minisini <<a href="mailto:benoit.minisini@gambas-basic.org" target="_blank">benoit.minisini@gambas-basic.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le 17/08/2022 à 13:42, Bruce Steers a écrit :<br>
> <br>
>Â Â Â Â Â Â Â Let's put the usefullness of flashy gradient buttons aside.<br>
>Â Â Â Â Â Â Â What you<br>
>Â Â Â Â Â Â Â would need is actually a brush, not a gradient. The gradient<br>
>Â Â Â Â Â Â Â is just a<br>
>Â Â Â Â Â Â Â particular case of a brush.<br>
> <br>
>Â Â Â Â Â Â Â And editing a brush (or any other complex property) in the<br>
>Â Â Â Â Â Â Â form editor<br>
>Â Â Â Â Â Â Â needs:<br>
> <br>
> <br>
> oh my god you're right. and right about the ReportBrush too.<br>
> Sorry i didn't get it at first.<br>
> <br>
> I can just use a string value set to use {ReportBrush} type and there is <br>
> everything i needed in a string that I can easily work with. don't even <br>
> need to add gb.report.<br>
> <br>
> Awesome :)<br>
> Respects.<br>
> BruceS<br>
> <br>
<br>
It's not enough. The problem is that you must understand how property <br>
values are stored in and retrieved from form files.<br>
<br>
"ReportBrush" is not just the way the property is chosen in the form <br>
editor, it's also which code is generated in the form file to initialize <br>
the property. You can't reuse it directly.<br>
<br>
For complex objects like brushes, you usually need an equivalent object <br>
in the component. For example, properties with "ReportBrush" kind uses <br>
the 'ReportBrush[]' array method of the gb.report(2) component.<br>
<br>
That logic is located in the 'CControl.GetEachProperty()' method.<br>
<br>
Regards,<br></blockquote><div><br></div><div style="font-size:small" class="gmail_default">Yes i spoke too soon in my excitement of your suggestions finally hitting me and thinking i had a really simple solution.</div><div style="font-size:small" class="gmail_default">It was all working editing in the IDE so I thought everything was great, but then i got an error when running the program (no ReportBrush)</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">So i have imported the ReportBrush.class and now it works like you say, not as a string but as an actual reportbrush object. Still that's something i can use.<br></div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Shame i cannot disable the color/image options of the reportbrush editor but i'll work around it :)<br></div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Cheers Ben :)</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">BruceS<br></div></div></div>