Maybe I'm misunderstanding this, but wouldn't it make sense to add the
add button to the screen where you view the document,
as in user views the document, says "Now, I want to "add" that document
I just viewed to the current database item I am working with", clicks
the Add button available in that screen and the document gets added.
Alternatively, you could use the popupmenu change event to show the view
window (dispense with the view button all together), and tell the users
they can select a document from the popup menu, and the document will
automatically be seen in a screen with an add button, that they can
click if needed.
If I understand correctly what you are trying to do, then it is this:
User clicks view button
User chooses document from list
User views document
User closes view window
User says "Now, I want to "add" that document I just viewed to the
current database item I am working with"
User clicks the add button
User gets the popup menu with the list again (preferably with the
previously selected document already selected), and needs to confirm
(even though he just clicked add for the document he already selected)
the document he wants by double clicking on the popup menu? I think it
is not good user interface design for the user to have to confirm what
is already selected, but if that is what you want to do, just create
your own popup menu with a double click event.
For instructions on how to do this follow the instructions by Geoff
Perlman for creating a double click canvas at:
http://www.realsoftware.com/listarchives/tips/2000-07/msg00001.html
Just follow the instructions, but replace popupmenu where it says
canvas. Since this code dates back to 2000, you need a slight adjustment
for the doubleclick to work.
In the mouseup event place
dim doubleClickTime, currentClickTicks as Integer
#if targetMacOS then
doubleClickTime=GetDoubleClickTime
#endif
#if targetWin32 then
Declare Function GetDoubleClickTime Lib "User32.DLL" () as Integer
doubleClickTime = GetDoubleClickTime()
#endif
currentClickTicks = ticks
//if the two clicks happened close enough together in time
if (currentClickTicks - lastClickTicks) <= doubleClickTime then
//if the two clicks occured close enough together in space
if abs(X - lastClickX) <= 5 and abs(Y - LastClickY) <= 5 then
DoubleClick //a double click has occured so call the event
end if
end if
lastClickTicks = currentClickTicks
lastClickX = X
lastClickY = Y
and create the following method : (as seen on
http://www.declaresub.com/ideclare/GettingStarted/3.1.html)
Private Function DoubleClickTime() As Integer
#if TargetCarbon
#if TargetMachO
Declare Function GetDblTime Lib "Carbon" () as Integer
#else
Declare Function GetDblTime Lib "CarbonLib" () as Integer
#endif
#endif
#if TargetPPC
Declare Function GetDblTime Lib "InterfaceLib" () as Integer
#endif
#if TargetMacOS
Return GetDblTime
#endif
End Function
Use that popupmenu instead of the normal one:
When you use this popupmenu, it will have a doubleclick event and you
can put code in there
For instance MsgBox "DoubleClicked on " + Cstr(me.ListIndex)
Hope it helps.
Dirk Cleenwerck
wagnerj@proaxis.com wrote:
(2) User goes back to the window and says, "Now, I want to "add" that
document I just viewed to the current database item I am working with".
User clicks an "Add" button and refers to the (same) document list as was
offered when the user selected "View"
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|