[Gambas-user] IDE doesn't show picture property of a custom Button control

Jorge Carrión shordi at gmail.com
Thu May 11 10:39:18 CEST 2023


My control behaves like yours, if I put some text in the Text property it
is displayed in the IDE. The problem arises when you make a button bar with
several buttons without text, then they all look the same but, well, it's
not a big deal.
Thank you all for your interest.

Greetings

El mié, 10 may 2023 a las 20:20, Bruce Steers (<bsteers4 at gmail.com>)
escribió:

>
>
> On Wed, 10 May 2023 at 12:44, BB <adamnt42 at gmail.com> wrote:
>
>>
>> On 10/5/23 9:01 pm, Bruce Steers wrote:
>>
>>
>>
>> On Wed, 10 May 2023 at 11:04, Jorge Carrión <shordi at gmail.com> wrote:
>>
>>> Hi, everybody.
>>> I'm making a control that is a Button that supports a background image. It
>>> works reasonably well, but the IDE doesn't show me the selected Stock image. All
>>> the buttons look the same at develop time and that's confusing. Does
>>> anyone know how to make the IDE recognize the Picture property and display
>>> the image as it does with, say, the Button control? I attach a small
>>> project that illustrates what I say.
>>>
>>
>> Not really.
>>
>> gambas IDE form designer can only show native controls,
>> The IDE loads the controls internally and that are coded to both
>> construct at runtime and to display in the IDE also. so it's not a good
>> idea to allow custom made controls to load into the IDE itself as it can
>> cause problems/crashes. So they do not.
>>
>> I added code to my gambas IDE that "does" load custom controls and made
>> them visible but it's no longer working due to some recent changes.
>>
>> Maybe if you made your class inherit Button not UserControl you may get
>> it to show the images but at best all you will see is the generic Button in
>> the IDE not any of your custom drawings.
>>
>> BruceS
>>
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>> You know, in 2023 I would really like this to work. 🙁
>>
>
> Yes it would be lovely.
>
> On closer inspection of my mod it does still "kinda" work.  it still tries
> to display the controls but it's not able to deal with any designer set
> values anymore so all i get is the generic default control as seen in the
> attached image the designer view on the left and the runtime look on the
> right.
>
> So even my mod would not help Jorge here.
> It worked fine a couple of months ago but Ben changed something and now
> it's limited. But still better than just a box
>
> It truly does give problems when you are working on the control though. as
> the IDE has pre-loaded the control code any changes you make confuse things
> (like changing property names). you have to do a lot of "compiling the
> control, then shutting down the IDE and restarting it to reload the
> controls changes"
> Point being it's not as simple and straight cut as you would think to see
> your custom control properly in the designer, especially if you are working
> on it. there's a whole load of error checking and control reloading going
> to be needed.
>
>
> BruceS
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230511/9b470b58/attachment.htm>


More information about the User mailing list