Hi All
Below is the code I use to create a Form and display an Image. As I don't want the user to resize the window I have used "Form.Resizable = False", unfortunately this resizes the Form slightly before locking the size. [See the two attached images]
Originally I thought it might be a timing issue but using a timer to delay "FormLV.Resizable = False" by a second did not help.
Does anyone have an answer to this?
Regards Roger
Below is the code I use to create a Form and display an Image. As I don't want the user to resize the window I have used "Form.Resizable = False", unfortunately this resizes the Form slightly before locking the size. [See the two attached images]
Originally I thought it might be a timing issue but using a timer to delay "FormLV.Resizable = False" by a second did not help.
Does anyone have an answer to this?
Regards Roger


B4X:
Sub BtnFiles_action
If File.Exists(DirPath, "") = False Then File.MakeDir(DirPath, "")
'Find files. Select file to import
Private Image1 As Image
Private FileChooser1 As FileChooser
FileChooser1.Initialize
FileChooser1.Title = $"Saved Files"$
FileChooser1.InitialDirectory = DirPath
Filename1 = FileChooser1.ShowOpen(MainForm)
Filename1 = Filename1.Replace(DirPath, "")
If Filename1 <> "" Then
Image1.initialize(DirPath, Filename1)
FormLV.Initialize("", Image1.Width, Image1.Height)
FormLV.SetFormStyle("DECORATED")
FormLV.Title = Filename1
FormLV.RootPane.Style = "-fx-background-image: url('" & File.GetUri(DirPath, Filename1) & "');"
FormLV.Show
'FormLV.Resizable = False
End If
End Sub