[Gambas-devel] ToolButton question

Robert Rowe robert.c.rowe at ...176...
Tue Apr 1 02:05:31 CEST 2008


I've included the ability to specify an Action for each toolbutton. Once 
you have the Action class in place I'll add the routine to wire up my 
toolbuttons to the action class so that they'll work together. I really 
like the idea of an action class and think that working with it is 
important for my toolbar. I actually didn't bother providing a way to 
specify hotkeys since the action class will provide this.

Do I have to do anything special to have property values saved in the 
.form file or will any property automatically save/restore itself? I 
used the _Properties constant to include my new properties in the 
property window.

Robert Rowe

Benoit Minisini wrote:
> On mardi 1 avril 2008, Robert Rowe wrote:
>   
>> OK, thanks. It's not a requirement for my toolbar, just something that
>> I'd like to offer. On my system (kubuntu) the default appears to be text
>> under icon if the text is visible. Both options seem to be available. I
>> can add this later. I spoke to Richard about alpha testing it for me.
>> He's very interested. I hope to have something worth testing by the end
>> of the week. If you find the time I'd appreciate it if you'd look it
>> over. I'd like to eventually have it included in the gambas source. I'm
>> trying to stick with the naming conventions but many of them are new to me.
>>
>> Robert Rowe
>>
>>     
>
> I will include it if it does not contradict my post about action 
> configuration. I put it there again because it is hard to find in the 
> mailing-list:
>
>   
>>> It will work, but I want to do that in different way:
>>>
>>> As you may have noticed, many controls have an "Action" property, that is
>>> a string. The goal of this property is to group all controls (button,
>>> toolbar buttons, menus) that can run the same action.
>>>
>>> The actions are accessed through the Action class. Each action have
>>> properties that are applied to each control associated with the action.
>>>
>>> For example, Action["push"].Visible = FALSE will hide all the controls
>>> associated with the "push" action.
>>>
>>> I want to add a "Shortcut" property, and when setting this property, the
>>> tooltips of the associated controls would be automatically set with the
>>> tooltip string and the shortcut string between braces. The shortcut are a
>>> string that can be translated too, so that different languages can have
>>> different defautl shortcuts!
>>>
>>> Then I want to add to the IDE an "action editor", like the "menu editor",
>>> so that you don't have to define action properties by code.
>>>
>>> Then I want to have in the gb.form component (or another one) a dialog
>>> that let the user defines its own shortcut for the program.
>>>
>>> People live with fixed shortcuts since the first version of Gambas. They
>>> can wait for the 3.0 version. :-)
>>>       
>
> Regards,
>
>   




More information about the Devel mailing list