[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need information about changed filter selection in the FileChooser control


On Sat, 1 Nov 2025 at 17:57, Claus Dietrich <claus.dietrich@xxxxxxxxxx>
wrote:

> Am 01.11.25 um 18:21 schrieb Bruce Steers:
> > Attached is your program now detecting the filter change :)
> Hi Bruce
>
> What a hack! Thanks a lot. It works well and I will go ahead with it.
>
> The question remains why we can't catch the documented events of the
> FileChooser. Is it a bug or wrong documentation? Could the control be
> improved in a way that users can catch a "FilterChange" event without
> this hack? I am certainly not the only one who needs a customized file
> saving dialog one day.
>
> With best regards
>
> Claus
>

It's the problem with compound controls.
They will usually Inherit UserControl.class so all the UserControl events
are automatically listed by the wiki.
I added some info about events not happening in the UserControl wiki page
https://gambaswiki.org/wiki/comp/gb.qt4/usercontrol

Here's the problem,
if you look at the FileChooser control source
https://gitlab.com/gambas/gambas/-/tree/master/comp/src/gb.form/.src/File/Chooser/
you will see it is a class inheriting UserControl that adds the FDirChooser
object.
The FDirChooser consists of a DirView, a FileView , a textbox, a combobox
and a panel of buttons.
The internal controls mouse events are used in the internal operation of
the parent Usercontrol so are not detected and sent by the FileChooser
itself

hope that makes sense

My hack will be moot if Benoit adds a filter change event though, but you
gotta love a good workaround right? :)

Respects
BruceS

Follow-Ups:
Re: Need information about changed filter selection in the FileChooser controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>