wodTelnetDLX Terminal Window Visible Rows (wodSFTP / wodSFTP.NET / wodSFTPdll)
Hi, I am now working with the wodTelnetDLX Active X user interface terminal window and wanted to see if there is a way to determine how many visible rows there on the window. I want to dynamically set the TelnetDLX1.Rows property based on the current size of the window. For example, if there is screen/window real estate for 50 rows, I want to set the terminal window to 50 rows. So, does the wodTelnetDLX provide a way to determine how many visible rows there are based on its dimensions?
Thanks,
Robert
Re: wodTelnetDLX Terminal Window Visible Rows
Robert,
hi. Currently wodTelnetDLX has no ability to dynamically change rows size, both for SSH and telnet protocols. Rows property needs to be setup before you initiate connection, and wodTelnetDLX will report this value to the server. Once connection is established, it cannot be changed.
But we could add this option. Can you please explain exactly what you're trying to do?
Regards,
Kreso
Re: wodTelnetDLX Terminal Window Visible Rows
I was attempting to fill the application window (my VB form) with the terminal window control and maximize the visible sapce with active terminal rows. So on the VB form's RESIZE event, I update the wodTelnetDLX's dimensions to fill the screen. I guess I overlooked the fact that the terminal screen size (rows & cols) are sent to the server upon connection. However, some simple telnet enabled devices and RS232 devices do not care about screen size and do not implement emulation escape sequences that deal with screen control. I guess the best example I have found is in a competitor's product; they offer a RowHeight property that lets me deal with changing the number of Rows based on the size of the terminal window. This RowHeight property deals with the actual font height, etc under the hood.
For example, here is a VB code excerpt of what I am trying to do...
[code]
Private Sub Form_Resize()
'//Resize VT Window
VT.Move 0, 0, ScaleWidth, ScaleHeight
'//Dynamically set the row count based on VT Window Height
VT.Rows = VT.Height (VT.RowHeight * Screen.TwipsPerPixelY)
End Sub
[/code]
Lastly, here is their description for this RowHeight property:
RowHeight: Returns the height of a single character (or line) according to the measurement units used by the container.
Thanks,
Robert
Re: wodTelnetDLX Terminal Window Visible Rows
Whhops, the forum HTML generator printed my sample code excerpt incorrectly, the last line of code should follow this mathematical formula:
[code]
VT.Rows = VT.Height DIV (VT.RowHeight * Screen.TwipsPerPixelY)
[/code]
Where DIB should be the forward slash representing integer division in VB.
Thanks, Robert
Re: wodTelnetDLX Terminal Window Visible Rows
Whhops, the forum HTML generator printed my sample code excerpt incorrectly, the last line of code should follow this mathematical formula:
[code]
VT.Rows = VT.Height DIV (VT.RowHeight * Screen.TwipsPerPixelY)
[/code]
Where DIB should be the forward slash representing integer division in VB.
Thanks, Robert
Re: wodTelnetDLX Terminal Window Visible Rows
Man, I'm making a mess of this forum. Sorry.
I was trying to write DIV not DIB
Re: wodTelnetDLX Terminal Window Visible Rows
Robert,
did you actually try to change Font property and use different font size?
kreso
Re: wodTelnetDLX Terminal Window Visible Rows
Do you mean, did I test changing the font with the competitor's controls? If so, then yes, I did test this feature with an actual terminal session. I connected to both a simple telnet device and to a Linux server. It seemed to behave properly, for example, when connected to the Linux server, I could alter the window size after the connection was established, and commands like clear would update the screen properly.
Thanks,
Robert
Re: wodTelnetDLX Terminal Window Visible Rows
Robert,
I mean to change wodTelnetDLX.Font property to enlarge/reduce font the way you want it.
Perhaps I don't understand the issue. How would RowHeight be different than Font.Size?
Kreso
Re: wodTelnetDLX Terminal Window Visible Rows
I am by no means an expert, but I dont think all fonts are created equal; meaning that an Arial font size 8, is not necessarily the same pixle beight as a Times New Roman size 8. The RowHeight property would simply give me the actual pixel height of a single row in the terminal window, regardless of font type, font attributes, or font size. Then I can simple take the Height of the overall terminal window and divide by this RowHeight property and determine how many Rows the terminal window could potentially accomodate.
Thanks,
Robert
Re: wodTelnetDLX Terminal Window Visible Rows
Robert,
we could add that. Please contact me to techsupport@weonlydo.com so I can see what needs to be added, and to send you version to try out. I see you mention 'competitor' word, so please write me which one I should download to see how it works.
Thanks,
Kreso