By design the BBCSDL dialogue manager treats double-clicking in a listbox the same as pressing OK, i.e. it returns a 1 from FN_showdialog(). This is commonly the required behaviour.I'd like to intercept a doubleclick event... What I would like to do is when the user double-clicks the listbox item it does the equivalent of the transfer button that moves the item to another list.
If you want double-clicking to do something different you must firstly make sure you can uniquely detect that condition (so for example allocate a code other than 1 to the OK button, if you have one) and then take the appropriate action when you see a 1 returned, as follows:
Code: Select all
REPEAT
result% = FN_showdialog(dlg%, &80000000, &80000000)
IF result% = 1 THEN
REM Perform the double-click action
ENDIF
UNTIL result% <> 1
Code: Select all
X% = &FFFFFFFF80000000 : Y% = &FFFFFFFF80000000
REPEAT
result% = FN_showdialog(dlg%, X%, Y%)
PROC_getdlgrect(dlg%, X%, Y%, W%, H%)
IF result% = 1 THEN
REM Perform the double-click action
ENDIF
UNTIL result% <> 1