Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Owner alignment in VO X# windows 20 Dec 2022 16:40 #24829

  • ic2
  • ic2's Avatar
  • Topic Author


  • Posts: 1608
  • 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

    Please Log in or Create an account to join the conversation.

    Owner alignment in VO X# windows 20 Dec 2022 20:07 #24830

    • Chris
    • Chris's Avatar


  • Posts: 3844
  • Hi Dick,

    We are not aware of such an issue, can you please send a (compilable) sample showing this?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Owner alignment in VO X# windows 21 Dec 2022 12:37 #24846

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1608
  • 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

    Please Log in or Create an account to join the conversation.

    Owner alignment in VO X# windows 21 Dec 2022 13:05 #24849

    • robert
    • robert's Avatar


  • Posts: 3447
  • 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:
    oDCMLE1:OwnerAlignment         := PTR(_CAST, 0x12130000)

    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
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    Owner alignment in VO X# windows 21 Dec 2022 14:16 #24850

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1608
  • Hello Robert,

    I am not sure why this worked in your VO code. It should not have worked in VO too.

    Thanks for the quick reply, this fixed it indeed.

    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

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1