Please enable JavaScript to view this site.

KOL/MCK - User Guide

popup

 

As already noted, pop-up menus in KOL are no different from the main one (except for the order in which they are created). But in order to display them, they must be ordered to "pop up", or by using the SetAutoPopupMenu method of any visual object on the form, an additional handler to the window that will execute such an order when the user performs certain actions (pressing a special button on the keyboard or the right mouse button) ...

 

Popup(X, Y) - makes a popup menu appear at the specified coordinates on the screen;

PopupEx(X, Y) - similar to the previous method, but behaves in a special way if the window of the parent form is invisible on the screen at that moment. Namely, it makes it visible (Visible = true), but takes it out of the screen for a while, effectively leaving it invisible to the user. The point of this "forgery" is to ensure that the pop-up menu is automatically hidden correctly when it "loses" focus, more precisely, when any other window is in focus. It is advisable to use this method when organizing the pop-up menu on the "tray icon" (see TTrayIcon), otherwise the pop-up menu does not "guess" in any way that it is time to hide if the user clicks past the menu. (Usually, the user does this if he decided that he does not want to select any of the items of such a menu, and wants to do something else, and here is the menu,

 

Flags - allows you to define a set of flags that will be used in the Popup and PopupEx methods as a parameter for the TrackPopupMenuEx API function. With the help of these flags it is possible to change such parameters as alignment and placement on the screen, permission to click on menu items with the right mouse button, animation method;

OnPopup - this event is triggered immediately before displaying a pop-up menu, or before expanding child menu items (when the mouse is hovering or moving the cursor to a menu item that has child items). In the handler of this event, it is allowed, inter alia, to change the composition, availability or some other states of individual subordinate items, depending on any external conditions. Among other things, it is possible to set the value of the NotPopup property to true, thereby preventing the "popup";

NotPopup - setting this property to true prevents the popup menu from popping up, or expanding the list of subordinate menu items;

CurCtl - a pointer to a window object of the PControl type, which initiated the automatic popup of the menu (since its handler of the corresponding window message, attached to it by calling SetAutoPopupMenu, triggered).

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC