dotgnu-general
[Top][All Lists]
Advanced

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

[DotGNU]bug in FileDialog


From: radek polak
Subject: [DotGNU]bug in FileDialog
Date: Sat, 21 Feb 2004 10:41:40 +0100 (CET)

Hi,
I found minor bug in System.Windows.Forms.FileDialog. If you try following case:
1) run ImageViewer or something with OpenDialog
2) when dialog opens click the first file in the list
3) click Open button - it doesnt work.
4) click second file and go back to first and click open. It works now.
If there is just one file in the directory you cant open it at all. I think 
this shouldfix it:

FileDialog.cs:
                // Handle a "focus enter" event.
                protected override void OnEnter(EventArgs e)
                                {
                                        base.OnEnter(e);
                                        if(selected == -1)
                                        {
                                                // Set the focus to the first 
entry by default.
                                                // selected = 0; - this was 
wrong - we want to change selection
                                                ChangeSelection(0);
                                        }
                                        DrawEntry(selected);
                                }

Also the file dialog doesnt handle double click very well. If you click fast on 
two different files it closes.

I hope i helped some.
Radek

PS: i am using pnetlib-0.6.2
____________________________________________________________
Nejvíc mi sedí, když si můžu vybrat! Třeba 1200 SMS, 120 MMS nebo 240 minut
volání ZDARMA. Vyberte si bonus, který opravdu chcete. 
http://ad2.seznam.cz/redir.cgi?instance=70752%26url=http://www.oskar.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]