Context Menu Position Mirror |
Post Reply |
Author | |
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
It mirrored only in Right-To-Left CommandBars.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
its designed to show contextmenu left to cursor. Standard RightToleft applications behave same.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
Hello Aaron, I am talking about this issue ... Regards,
|
|
:Powerbuilder 10.5
:Codejock suite 11.2.2 ========================= Waleed Seada |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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 Flags As Variant, _ Optional ByVal x As Variant, _ Optional ByVal y As Variant _ ) As Long Parameters
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.... |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
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
|
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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 |
|
MIKET
Newbie Joined: 11 September 2008 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
|
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
|
|
WaleedSeada
Groupie Joined: 29 March 2007 Location: Egypt Status: Offline Points: 88 |
Post Options
Thanks(0)
|
Hello Miket,
What API's ...!! Can you clarify more ...
Best regards
|
|
:Powerbuilder 10.5
:Codejock suite 11.2.2 ========================= Waleed Seada |
|
MIKET
Newbie Joined: 11 September 2008 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
|
I am looking to create a sample ribbon bar so any API's pertaining to that would be very helpful. Thanks!
|
|
Mike
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |