Applies To: |
|
Summary: |
As a result of code changes for CitectSCADA
v6.0, the function CSV_Nav_DisplayMenuBar() does not function correctly in any of the following situations: 1. When the menubar is pasted at a different position on the page (i.e. other than x=2,y=25) - the popup menu appears at the wrong location 2. When x,y coordinates are specified - coordinates are ignored 3. When more than one menubar is pasted on a page - only one menubar appears |
Solution: |
To fix these problems please replace the
functions “CSV_Nav_DisplayMenuBar” and “_CSV_Nav_DisplayMenuBar”
with the following (tried and tested) code: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME // CSV_Nav_DisplayMenuBar() // // REV DATE WHO DESCRIPTION // 0 11/03/03 J.Venz Original // // GENERAL DESCRIPTION // // Create menu bar for specified page. // // The menu.dbf is accessed to determine what buttons should appear in the menu bar. // A new menu bar (ActiveX object) is created with the specified buttons. // // ARGUMENTS: // // sPageName - Name of page // iX - x coordinate of top left corner of menu bar // iY - y coordinate of top left corner of menu bar // nBackColour - background colour of menu bar (citect palette number) // nForeColour - foreground (font) colour of menu bar (citect palette number) // // RETURNED VALUE: // // 0 if successful, otherwise -1. // // PSEUDO CODE: // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// INT IF
sPageName
= ""
THEN IF
nBackColour
= Transparent THEN IF
nForeColour
= Transparent THEN nForeColour
= miMenuForeColour; _CSV_Nav_DisplayMenuBar(iX, iY, sPageName, nBackColour, nForeColour); RETURN 0; END
INT INT
bReady
= 0; WHILE
(bReady
= 0)
DO IF (iX <> -1 AND iY <> -1) OR iMenuAn <> -1 THEN IF
iMenuAn
= -1
THEN IF
iMenuAn
<> -1
THEN iError = IsError(); IF
NOT
iError
THEN IF
CSV_WinUtl_GetColourRes()
= 0
THEN iForeColour
= CitectColourToPackedRGB(nForeColour); RETURN iError; END |
Keywords: |
popup menu, sub menu, menu, menubar, displaced |
Related Links
Attachments