Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rearranging Controls based on the Value of a TextBox

0 views
Skip to first unread message

Superfreak3

unread,
Jan 7, 2008, 3:23:54 PM1/7/08
to
I have some labels and textboxes on a form that I would like to
rearrange based on the Value (Val) of the textbox. Upon form load and
when records are traversed, the current state of affairs is...

Label1 TextBox1 containing text of "3" or Val of 3
Label2 TextBox2 containing text of "1"
Label3 TextBox3 containing text of "2"

I would like a routine that when the form is first displayed (Load) or
records are traversed (button Click event) the above information
information is rearranged as follows:

Label2 TextBox2 containing "1"
Label3 TextBox3 containing "2"
Label1 TextBox1 containing "3"

Any pointers would be greatly appreciated!

Thanks in advance!!

RobinS

unread,
Jan 8, 2008, 2:57:50 AM1/8/08
to
Have you considered using a DataGridView instead of a bunch of textboxes?

RobinS.
GoldMail, Inc.
--------------------------------
"Superfreak3" <Matt....@synergis.com> wrote in message
news:5d956aa1-543f-443b...@s19g2000prg.googlegroups.com...

Superfreak3

unread,
Jan 8, 2008, 8:41:59 AM1/8/08
to
On Jan 8, 2:57 am, "RobinS" <rob...@imnottelling.com> wrote:
> Have you considered using a DataGridView instead of a bunch of textboxes?
>
> RobinS.
> GoldMail, Inc.
> --------------------------------"Superfreak3" <Matt.Wal...@synergis.com> wrote in message

>
> news:5d956aa1-543f-443b...@s19g2000prg.googlegroups.com...
>
>
>
> >I have some labels and textboxes on a form that I would like to
> > rearrange based on the Value (Val) of the textbox.  Upon form load and
> > when records are traversed, the current state of affairs is...
>
> > Label1          TextBox1 containing text of "3" or Val of 3
> > Label2          TextBox2 containing text of "1"
> > Label3          TextBox3 containing text of "2"
>
> > I would like a routine that when the form is first displayed (Load) or
> > records are traversed (button Click event) the above information
> > information is rearranged as follows:
>
> > Label2          TextBox2 containing "1"
> > Label3          TextBox3 containing "2"
> > Label1          TextBox1 containing "3"
>
> > Any pointers would be greatly appreciated!
>
> > Thanks in advance!!- Hide quoted text -
>
> - Show quoted text -

The way the data is arranged in the database, I thought it might be a
little involved to use a DataGrid view.

The text boxes display a rating with each being bound to a different
field in the database.

RobinS

unread,
Jan 9, 2008, 2:36:36 AM1/9/08
to
Ah, so Textbox1 is bound to a different column than Textbox2, and so on.

You could transform the data into a datatable to be displayed -- just create
a new one, and put the data in it accordingly, then bind it to the
datagridview and sort it using a bindingSource. Or move your textboxes
around on the screen, which would be more difficult.

RobinS.
GoldMail, Inc.
---------------------------------


"Superfreak3" <Matt....@synergis.com> wrote in message

news:1de347c8-80d2-43ee...@t1g2000pra.googlegroups.com...

0 new messages