Default button

Started by Elias Montoya, January 18, 2010, 04:37:03 PM

Previous topic - Next topic

Elias Montoya

 I had a command in my form called Command5. Its a search button,
when i clicked it, the app was supposed to find matching documents for some
criteria.

But instead the documents dialog closed. I cheched the procedure and
all i had was this:

Call LoadDocuments(HWND_DOCUMENTOS_LISTVIEW1, FF_Control_GetText(HWND_DOCUMENTOS_CRITERIATEXTBOX))

I removed the command and dialog still closed when pushing that button.
I removed the DOCUMENTOS_COMMAND5_BN_CLICKED function and dialog still closed when pushing that button.

What fixed it?

Turns out It is possible to have two or more default buttons, and i copied my "Search" button and pasted it
as a "Close" Button. For some reason it was ignoring the search command and only considering the close command.
Im not sure how that works... but its weird anyway.

I thought i should report it. Since its a hard to find issue.

:)
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Paul Squires

Thanks Elias. I was having a lot of trouble with copy/pasted controls that had the Default setting set. I had code that was supposed to check for multiple Default button conditions. For various reasons, it would cause problems so I removed that code some time ago. It is now in the hands of the programmer to set or unset that property.
Paul Squires
PlanetSquires Software