B4J Question HTMLEditor not expanding

achapman

Member
Licensed User
Longtime User
upload_2017-9-17_11-20-50.png


Hi guys, a bit of a hairy one.

As you can see above, the HTMLEditor control is not expanding to fill it's panel.

Steps to reproduce:
  1. Add an HTMLEditor into your design file, and set it to expand/anchor both vertically and horizontally.
  2. Load the layout and run the app
  3. Expand your window to be larger vertically - I'm running 1920 x 1080 px on the monitor.
  4. Type into the HTML editor like above. You'll see the editor's internal panel does not expand to fill the height even though the "outer" panel does.
I suspect there will be no easy solution here but thought I'd ask in case someone else has managed to fix it.

Cheers and thanks!
Andy.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This code will cause it to update the size together with the form size:
B4X:
Sub Process_Globals
   Private fx As JFX
   Private MainForm As Form
   Private HTMLEditor1 As HTMLEditor
   Private wvEditor As WebView
End Sub

Sub AppStart (Form1 As Form, Args() As String)
   MainForm = Form1
   MainForm.Show
   MainForm.RootPane.LoadLayout("1")
   Dim jo As JavaObject = HTMLEditor1
   wvEditor = jo.RunMethod("lookup", Array("WebView"))
End Sub

Sub MainForm_Resize (Width As Double, Height As Double)
   wvEditor.SetSize(Width, Height)
End Sub
 
Upvote 0
Top