[Gambas-user] Embedding the Linux console

T Lee Davidson t.lee.davidson at ...626...
Thu Apr 28 20:01:30 CEST 2016


On 04/28/2016 11:31 AM, Jorge Carrión wrote:
> Hi,
>
> I like to embbed a system console, like gnome-terminal or similar, in a
> form. We are doing a computer control sistem in the job, and have done a
> microsoft-tree-domain inteface. i like implement the feature of open a
> ssh-terminal of the showed computers, but adding it a menu bar.
>
> Time ago there was a "embedder" control, but it not longer exist.
>
> It's posible do this?
>
> Thanks in advance.

[code]
' Gambas class file

Public sOutput As String

Public Sub Form_Open()
   TextArea1.Insert("#>")
End

Public Sub TextArea1_KeyPress()
   If Key.Code <> Key.Enter And Key.Code <> Key.Return Then Return
   Stop Event
   Shell Right(Split(TextArea1.Text, "\n").Pop(), -2) To sOutput
   TextArea1.Insert("\n" & sOutput & "#>")
   TextArea1.EnsureVisible   ' (That's nice, Benoît.)
End
[/code]


You can of course change the default colors of the TextArea to a light on dark to simulate a terminal. But, the cursor will 
likely become invisible and is not easily changed.


-- 
Lee
__________

"Artificial Intelligence is no match for natural stupidity."




More information about the User mailing list