[Gambas-user] Moving modal form if width derived from style.css

Safiur Rahman isafiur at gmail.com
Fri Sep 24 12:05:14 CEST 2021


Hi

1) Webform2.ShowModal(Me) doesnot solve the problem.
2) I have to use css styles for form width because I have been using
viewport for different screen sizes (for mobile and desktop devices)
Me.AddHeader("<meta name='viewport' content='width=device-width,
initial-scale=1'>")

and in CSS
@media screen and (min-width: 205mm) {
.size-popupform {
    width:50vw;
  }
}

@media screen and (max-width: 204mm) {
 .size-popupform {
    width:90vw;
  }
}



On 9/24/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)
>
> --
> Regards
> Safiur Rahman
>


-- 
Regards
Safiur Rahman


More information about the User mailing list