[Gambas-devel] Another extrange thing

Daniel daniel.campos at ...103...
Sat Jun 5 14:17:51 CEST 2004


I'm afraid but there's another problem with menus:

'Delete' event never raises, nor using "menu.delete" nor 
killing the parent window or menu.

(using both old CMenu files and the fixed new you sent me)

Regards,

Daniel Campos


El sáb, 05-06-2004 a las 00:49, Benoit Minisini escribió:
> On Saturday 05 June 2004 00:28, Daniel wrote:
> > OK, it works!
> 
> Cool.
> 
> >
> > Just 3 questions more... There are two properties that have not effect
> > in 'root menus', that is, menus that are children of a Window:
> >
> > - Picture : these menus have no picture, but I can do Menu.Picture=(a
> > picture), and that menu seems to really have a picture (I can read the
> > property)
> >
> > - Checked : these menus do not show the 'check', and if I try to do
> > Menu.Checked=TRUE, when I read the property it always says 'FALSE'
> >
> >
> > And the questions are:
> >
> > 1) Why these menus have no picture and can not be checked?
> 
> Because of QT: the menu class hides all the specific Qt management of menus.
> 
> In a few words: QT has only a QPopupMenu class that you fills with separators 
> and entries, that are not widgets!
> 
> To have the same simple semantic as VB, a gambas menu object becomes a true QT 
> QPopupMenu widget only when it gets children. Otherwise, it is just an item 
> inserted in its parent, which can be a QPopupMenu, or the menubar of the 
> window.
> 
> And the window menu bar is a QMenuBar widget that don't display the pictures 
> associated with its entries. So...
> 
> >
> > 2) If it is not possible or desiderable(why not?), why picture property
> > is stored, but 'checked' has no effect?
> 
> Checked has no effect because QMenuBar do not use it.
> 
> >
> > 3) Why these root menus, and menus which have children do not fire the
> > 'clicked' event?
> 
> Because of QT. QPopupMenu and QMenuBar raise a signal when one if its child is 
> clicked, except if it is another poupmenu. And QMenuBar raises the signal, 
> but the gambas don't catch it. I didn't do that because I don't like entries 
> in the window menu bar that are not real menus.
> 
> Regards,





More information about the Devel mailing list