[Gambas-user] Moving modal form if width derived from style.css
Bruce Steers
bsteers4 at gmail.com
Fri Sep 24 10:31:38 CEST 2021
On Fri, 24 Sept 2021 at 09:21, Safiur Rahman <isafiur at gmail.com> wrote:
> Hi Benoît
>
> I want to move a modal form to top centre from its actual centre
> position. When I move the form as:
>
> Public Sub _new()
>
> Me.Move("calc(50vw - " & Me.Width & " * 0.5)", "0px")
>
> End
>
> The form moves to top centre if form width is specified in property.
> The form doesnot move to top centre if form width is derived from
> style.css using class property.
>
> How can I move the form to top centre if form width is derived from css?
> (Attached a project to replicate the problem)
>
Not sure why you want to use css styles for form width. Just use Me.Width
Me.Move((Screen.Width - Me.Width) / 2, 0)
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210924/c6d3b5bb/attachment.htm>
More information about the User
mailing list