` Popup menus don't work when there are no records in the list (Russ Eggen ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Popup menus don't work when there are no records in the list
1998-05-21 -- Russ Eggen
 
The reason this happens is that ABC calls the pop-up on EVENT:NewSelection. Since no records are there, there is no EVENT:NewSelection to generate. However, there is a way to make this work: In your Init() method (priority LAST) add this: ?List{PROP:ALRT,255} = MouseRight !Alert right-click Then in the first EVENT:AlertKey embed for ?List control in the ThisWindow.TakeFieldEvent: IF KeyCode() = MouseRight AND RECORDS(BRW1.Q) = 0 POST(EVENT:NewSelection,?List) !Post the event ABC uses for pop-ups END Then in the first EVENT:PreAlertKey embed for the ?List control in the ThisWindow.TakeFieldEvent: CYCLE !Let all right-clicks acts as normal The main thrust of all this code is alerting the right-click, then checking to see if the Queue has any records, er... entries .


Today is November 21, 2024, 7:38 am
This article has been viewed 35185 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: