Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Question on textboxes

$
0
0
I'm trying to find out if the following is possible, I think I have the right way to do it in my head, I'm currently thinking through the code required to make it work.

Application requirements:
Read data class - Receive data from a source (In this case it will be either TCP or Serial)
Once the data is read it would then need to be put into a multiline textbox on the form

Here's the tricky bit in my head.

Please forgive me I've only just started to dive into oo stuff. Have been practising a lot with console applications to start with.

I'm guessing what I need to do is the following

Create a separate class for the textbox creation?
After the end of data class - it would jump to a "textbox" class
It would need to draw the textbox to the size required (I'm guessing the size required could be done by counting the lines of the data)
Once the textbox has been defined it would then be put onto the form
then the read data into the textbox
This is the part I am unsure on though.

The first textbox I could create (I would just tell it the starting position, define the x,y)
It's the If statements I'm unsure on....
On the second textbox creation, it needs to start at the bottom of textbox1.... But
If textbox2 does not fit within the bounds of the form and under textbox1 then
It would then create that textbox to the left of textbox1

How can I tell it to simply tack to the bottom of textbox1? Can I do that, or do I need to find out what the actual position on the form would be?

In short, I need the textboxes to be very custom

I hope I'm making sense.

I can provide images as to what I am trying to achieve.

I'm not so much looking for code as yet - I want to try and do this myself, but if someone could correct/accept my logic I would be grateful. Once I've gotten into the actual form creation - I'll post up some script

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>