FileChooser Message on Double click
Posted
#1
(In Topic #758)
Expert

The message
This appears before the 'Activate' process instigates.
When you click on 'Overwrite' the process then continues as normal.
Any suggestions ?
Note# this is not specific to any one project. I get this in all instances where the FileChooser component is being used.
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Guru

Posted
Guru

Code (gambas)
- iMsg = Message.Warning("<b>" & sOutput & "</b><p>" & ("This file or directory already exists."), ("Overwrite all"), ("Overwrite"), ("Cancel"))
I have come up with a workaround, try the following code: -
Code (gambas)
- Splitter1 As Splitter
- .Height = 500
- .Width = 800
- .Padding = 5
- .Arrangement = Arrange.Vertical
- .Center
- Splitter1.Layout = [30, 70]
<IMG src="https://www.cogier.com/gambas/FileChooserWorkAround.png">
</IMG>
Posted
Guru

cogier said
This seems to be a bug. I can't find a way to capture the _DblClick() event. I even tried adding an Observer without success. The problem seems to have something to do with the FileChooser_Uncompress() routine which is in the FDirChooser.Class. Part of the code is below: -
Yeah FileChooser _DblCick does not do anything (there's some other controls have the same behaviour). The _Activate event fires on _DblClick instead for some reason? :-\
Posted
Expert

Changing the FileChooser property ReadOnly to True stopped the pop-up message.
This has annoyed me for such a long time - thanks guys !
I use the Activate event to process a file selection on double click.
Edit: The reason that the Activate event is used, 'may' be that when you have a standard control like FileChooser, where it is made up of two controls;
Which control is being double clicked? I imagine that under the covers, there are two distinct double click events that are merged into an Activate event.
This is a guess but should not be too far from the truth.
Cheers - Quin.
I code therefore I am
I code therefore I am
1 guest and 0 members have just viewed this.



