[Gambas-devel] Wish: Html view for Data files in text editor.
Benoit Minisini
gambas at ...1...
Sun Oct 24 15:40:25 CEST 2004
On Tuesday 12 October 2004 19:12, ron wrote:
> HTML view for TextEditor form.
> Esc key changes the view between HTML and Text.
>
> In FTextEditor:
>
> *******************************************************
> Add a TextView control on form.
> change name to HtmlView
> *******************************************************
> change in PUBLIC SUB _new(sPath AS String)
> -----
> DrawTitle
>
> END
> -----
> to
> -----
> DrawTitle
>
> ViewMode("text")
> IF Instr(UCase(Left(sText,128)),"<HTML") THEN ViewMode("html")
>
> END
> -----
> *******************************************************
> change Form_Resize:
> -----
> PUBLIC SUB Form_Resize()
>
> edtEditor.Move(0, 0, ME.ClientW, ME.ClientH)
> 'lblCursor.Move(0, ME.ClientH - lblCursor.Height)
> END
> ------
> to
> ------
> PUBLIC SUB Form_Resize()
>
> edtEditor.Move(0, 0, ME.ClientW, ME.ClientH)
> 'lblCursor.Move(0, ME.ClientH - lblCursor.Height)
> HtmlView.Move(0,0, ME.ClientW, ME.ClientH)
> END
> ------
> *******************************************************
> Add at end code:
> ------
> PUBLIC SUB htmlview_KeyRelease()
> IF key.Code=key.Escape THEN ViewMode("text")
> END
>
> PUBLIC SUB edtEditor_KeyRelease()
> IF key.Code=key.Escape THEN ViewMode("html")
> END
>
> PRIVATE SUB ViewMode(mode AS String)
> IF mode="html" THEN
> edtEditor.Visible=FALSE
> HtmlView.Visible=TRUE
> HtmlView.Text = edtEditor.Text
> HtmlView.SetFocus
> ELSE
> HtmlView.Visible=FALSE
> edtEditor.Visible=TRUE
> edtEditor.SetFocus
> ENDIF
> END
> -----
>
>
> grtz Ron
>
I note your proposal for after the 1.0 :-)
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the Devel
mailing list