Skip to content

TypedSDK: Setting a control coordinates manually uses top-left corner for 0,0, unlike VO which uses the bottom left corner #1743

@cpyrgas

Description

@cpyrgas

https://www.xsharp.eu/forum/topic?p=34378#p34378

As per the description, using SELF:oDCFixedBitmap1:Origin := Point{0,0} puts the control in the top-left corner, when using the xGUI classes. The correct behavior (what the standards VOGUI does) is to put the control fully visible at the bottom-left corner, so the actual location Y that should be used in winforms terms would be:

WinFormsY := <window height> - <location specified> - <control height>)

Also when enabling "Pixel Positions" in the WED, which makes it emit control locations in the code when instantiating them like

SELF:oDCAboutText := FIXEDTEXT{SELF , ResourceID{ HELPABOUT_ABOUTTEXT , _GetInst() } , Point{487 , 174} , Dimension{245 , 93} }

then the problem does not happen, control is still placed correctly, as dictated by the resource. But this means that locations specified in the constructor are ignored.

TypedSDKTest.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions