Context Menu Position Mirror
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11921
Printed Date: 23 November 2024 at 10:50am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Context Menu Position Mirror
Posted By: WaleedSeada
Subject: Context Menu Position Mirror
Date Posted: 21 August 2008 at 8:01am
Dear all,
I am developing a multi-language interface for my application, I notice a strange behavuior of the context menu from my application in the Arabic (Left-to-Right) version the menu position is mirrored ... I mean not positioned as excpected as in English or any other versions ...
How can I fix this ...!!!
Best regards,
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Replies:
Posted By: Oleg
Date Posted: 22 August 2008 at 1:11am
Hello,
It mirrored only in Right-To-Left CommandBars.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: WaleedSeada
Date Posted: 24 August 2008 at 5:59am
Hello Oleg,
Yes it is in the unicode version, how can I overcome this issue, the position of the context menu is incorrect ....
Does your answer means it is a BUG or what ....
Best regards,
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: WaleedSeada
Date Posted: 24 August 2008 at 6:15am
Hello,
I want to add here another thing, when I create my own context menu its direction is correct .... !!!
What should this mean ....
Best,
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: Oleg
Date Posted: 25 August 2008 at 1:42am
Hello,
its designed to show contextmenu left to cursor. Standard RightToleft applications behave same.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: WaleedSeada
Date Posted: 25 August 2008 at 5:55am
Hello Oleg,
Pardom Me !! Right to left applications doesn't behave like that, I mean as I am explaining...
To make myself clear ....
The PB Context Menu Position is Mirrord Not the Menu Object Itself ....
So if I right-click on the right side of the object the menu appear the other side to the left .... !!
Is this enough, I want to attach or insert the image I have to show you the issue but I can't.
Regards,
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: Aaron
Date Posted: 25 August 2008 at 6:23am
Hi,
Oleg,
I don't know if this supposed to be that way but Popupwindow will show to right side of mouse position. Captions will be right aligned.
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: WaleedSeada
Date Posted: 25 August 2008 at 6:46am
Hello Aaron,
I am talking about this issue ...
Regards,
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: Aaron
Date Posted: 25 August 2008 at 7:21am
Hi,
That's weird... I can't reproduce that. Do you position the popupwindow yourself?
Can you upload a test project with same problem?
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: WaleedSeada
Date Posted: 25 August 2008 at 7:50am
Hello Aaron,
Create a new PB project and drop the Unicode version of the commandbars on a window, set the right-to-left prop. to true, and then on a right-click of any object on that window create the popup menu as follows: (just an example)
m_ShortCutMenus lm_ShortCuts
lm_ShortCuts = CREATE m_ShortCutMenus
lm_ShortCuts.m_tv.popmenu(iw_MDI.pointerx(),iw_MDI.pointery())
Where (iw_MDI) is the main MDI window ....
That's all....
regards
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: Aaron
Date Posted: 25 August 2008 at 8:43am
Hi,
I'm sorry, I don't have PowerBuilder . I'm the one who is complaining that members don't show their info and now there is one who did add it, I'm not reading it....
Anyway...
I see you want to show popup with x & y positions:
lm_ShortCuts.m_tv.popmenu(iw_MDI.pointerx(),iw_MDI.pointery())
Syntax of ShowPopup is:
Public Function ShowPopup( _ Optional ByVal mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20V12.0\Help\SymbolReference.chm::/XtremeCommandBars~CommandBar~ShowPopup.html# - - x As Variant, _ Optional ByVal mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20V12.0\Help\SymbolReference.chm::/XtremeCommandBars~CommandBar~ShowPopup.html# -
Parameters
- Flags
- The mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20V12.0\Help\SymbolReference.chm::/XtremeCommandBars~Enumerations~XTPTrackPopupFlags_EN.html - flags of the popup
- x
- The x-coordinate where the popup menu should be shown
- y
- The y-coordinate where the popup menu should be shown
And you pass the first two params as x & y
You should pass it through second and third param
I think that's the real problem But if you dont use them, popup menu will be shown (standard) on mouse position
Just use: lm_ShortCuts.m_tv.popmenu
or
use
lm_ShortCuts.m_tv.popmenu(<optional flag>, iw_MDI.pointerx(),iw_MDI.pointery())
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: WaleedSeada
Date Posted: 25 August 2008 at 9:12am
Hello Aaron,
Sorry to grap your attention back to the content of the issue, if you read carfully you will find that I am talking about PB Context menu not Commandbars Context Menu ....
Thanks for your feedback anyway ...
Best,
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: Aaron
Date Posted: 25 August 2008 at 9:44am
Hi,
Well you're right, you mentioned this once, this is about PB context menu but then I have to ask myself: what has this to do with CJ commandbars? If my VB popupmenu doesn't function as should I don't ask CJ for a solution. They can't help it when VB PopupMenu method doesn't work properly... I think you have to check your own code...
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: WaleedSeada
Date Posted: 26 August 2008 at 1:52am
Hello Aaron,
I have this project without CJ-Commandbars and the PB context menus working just fine (English/Arabic.).
Actually I belive that CJ is affecting PB in a funny way, I try to place an image of the ribbon on the MDI window I did this before for PB using windows API's and it was fine, but with CJ it flicks !!!
I can live without the image, but not without the PB context menus, it will need a lot of effort to re-develop the same logic using CJ-Commandbars.
Regards,
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: Aaron
Date Posted: 26 August 2008 at 2:22am
Hi,
OK, now I understand. It could be possible that CJ controls affect the behaviour of other controls. I have a simular issue with forms that should stay on top (like Windows Taskmanager) but that isn't working anymore. I think this has to do something with DockingPanes...
I think you need a support member to answer this one, good luck
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: Baldur
Date Posted: 26 August 2008 at 4:07am
The problem maybe as follows (example in VB):
The Mouse-Coordinates in Down/Up/Move-events are normally always relative to the controls position.
The ShowPopup-Method needs the absolute screen-coordinates.
If you don't use the x- and y-positions in the ShowPopup, CJ grabs the actual absolute mouse-coordinates.
If you give the positions by yourself, you need to calculate the controls-coordinates to the screen-coordinates.
In Windows-API you can use ClientToScreen-Function.
Or you get the actual absolute-position by yourself:
Public Type POINTAPI x As Long y As Long End Type
Public Declare Function ClientToScreen Lib "user32" Alias "ClientToScreen" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
|
Posted By: WaleedSeada
Date Posted: 26 August 2008 at 4:55am
Hello All,
Thanks for your imput all, but I guess there is no solution to this issue.\
So I decided to move forward and re-develop the PB Context Menus as Commandbar context menus, of course this require a lot of effort and time but I am sure the result will be great and impresive ....
Best regards,
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: MIKET
Date Posted: 11 September 2008 at 4:24pm
Waleed,
I am trying to put together a ribbon sample in PB. Can you lend any advice as to an approach? You mentioned API calls. Are you calling them as external function calls? A quick example would be very helpful if you have it available. Thanks in advance for you time/input.
------------- Mike
|
Posted By: WaleedSeada
Date Posted: 18 September 2008 at 3:52am
Hello Miket,
What API's ...!! Can you clarify more ...
Best regards
------------- :Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
|
Posted By: MIKET
Date Posted: 18 September 2008 at 9:28am
I am looking to create a sample ribbon bar so any API's pertaining to that would be very helpful. Thanks!
------------- Mike
|
|