In our VO project-in-conversion we have VO windows. Unchanged these have owner alignments settings.
Now I see in e.g. 1 screen that a couple of separate controls with OA_X at the right of the window move further right while enlarging the window, as expected and like in VO.
But we have a couple of other control, MLE e.g., with resp OA_WIDTH_HEIGHT, OA_Y_WIDTH and OA_HEIGHT, next to each other. Below on the full width of the window a bBrowser with OA_WIDTH_HEIGHT.
None enlarge or move when on enlarging that very same window, while this works fine in VO.
What could cause that? How to solve?
Dick
Owner alignment in VO X# windows
Owner alignment in VO X# windows
Hi Dick,
We are not aware of such an issue, can you please send a (compilable) sample showing this?
We are not aware of such an issue, can you please send a (compilable) sample showing this?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Owner alignment in VO X# windows
Hello Chris,
In a simple test program it worked fine. But I found the cause. In the postinit of the window, code like this is applied:
Self:oDCmOpmerking:OwnerAlignment := 0x15140000 // 1/5 1/4 0% 0%
Self:oDCMemoIntern:OwnerAlignment := 0x15140014
Self:oDCMemoCarcube:OwnerAlignment := 0x15140024
Self:oDCMemoOrder:OwnerAlignment := 0x15140034
I was already a bit surprised about the seemingly random owner alignments in the window editor of some of the MLE's but in VO this is apparently overruled by these settings and in X# this is doing nothing.
I guess I can apply that in a sample but maybe you have an idea why the above doesn't set owner alignment in X# without a sample?
Dick
In a simple test program it worked fine. But I found the cause. In the postinit of the window, code like this is applied:
Self:oDCmOpmerking:OwnerAlignment := 0x15140000 // 1/5 1/4 0% 0%
Self:oDCMemoIntern:OwnerAlignment := 0x15140014
Self:oDCMemoCarcube:OwnerAlignment := 0x15140024
Self:oDCMemoOrder:OwnerAlignment := 0x15140034
I was already a bit surprised about the seemingly random owner alignments in the window editor of some of the MLE's but in VO this is apparently overruled by these settings and in X# this is doing nothing.
I guess I can apply that in a sample but maybe you have an idea why the above doesn't set owner alignment in X# without a sample?
Dick
Owner alignment in VO X# windows
Dick,
For this style of the owner alignment to work, the value needs to be of type PTR.
In your code, these are numbers.
In the linear owner alignment sample in VO, this can be seen as:
So you need to add the PTR(_CAST,...) to your code.
I am not sure why this worked in your VO code. It should not have worked in VO too.
Robert
For this style of the owner alignment to work, the value needs to be of type PTR.
In your code, these are numbers.
In the linear owner alignment sample in VO, this can be seen as:
Code: Select all
oDCMLE1:OwnerAlignment := PTR(_CAST, 0x12130000)
I am not sure why this worked in your VO code. It should not have worked in VO too.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Owner alignment in VO X# windows
Hello Robert,
We have seen this often, that we wondered how it could ever work in VO but it did. Great for sloppy written code but it's good that X# is tighter. In some cases like this it is not immediately clear (as this compiled without error) but good we found it.
Dick
Thanks for the quick reply, this fixed it indeed.robert post=24849 userid=253 wrote: I am not sure why this worked in your VO code. It should not have worked in VO too.
We have seen this often, that we wondered how it could ever work in VO but it did. Great for sloppy written code but it's good that X# is tighter. In some cases like this it is not immediately clear (as this compiled without error) but good we found it.
Dick