I have a menu item that creates a new command button.
Each time I create a new command button I need to position it to the left of
the last created button.
In VB6 I could create a control array, look at the UBound of the array (Last
control Created) and find the
position of the last created control in order to place any new controls next
to it.
Creating controls in DotNet is different. I can create the controls
dynamically but have no
way of getting the co-ordinates of the previously created control since
there is no index property.
-Lou 7 1256
Lou,
Of course is there an index property.
The first in an array is 0.
So the previous control is when it is not zero this index -1
Cor
Cor, you're talking about the TabIndex, right?
Robin S.
------------------------------
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:e$**************@TK2MSFTNGP05.phx.gbl...
Lou,
Of course is there an index property.
The first in an array is 0.
So the previous control is when it is not zero this index -1
Cor
Cor, you're talking about the TabIndex, right?
no .
dim mycontrolarray() as control = {Button1, TextBox2, TextBox4, Button2}
The indexes are in that case 0, 1,2,3
Cor
There is no index property of a button
I thought you could not have an array of controls in DotNet.
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:O6**************@TK2MSFTNGP02.phx.gbl...
>
>Cor, you're talking about the TabIndex, right?
no .
dim mycontrolarray() as control = {Button1, TextBox2, TextBox4, Button2}
The indexes are in that case 0, 1,2,3
Cor
On Feb 8, 7:42 am, "Lou" <lou.gar...@comcast.netwrote:
There is no index property of a button
I thought you could not have an array of controls in DotNet.
"Cor Ligthert [MVP]" <notmyfirstn...@planet.nlwrote in messagenews:O6**************@TK2MSFTNGP02.phx.gbl. ..
Cor, you're talking about the TabIndex, right?
no .
dim mycontrolarray() as control = {Button1, TextBox2, TextBox4, Button2}
The indexes are in that case 0, 1,2,3
Cor
He's talking about the index of an array that contains the control,
not the old VB6 index property.
Thanks,
Seth Rowe
Yeah, that's what I suspected, but it wasn't clear. The OP is thinking
about control arrays as they existed in VB6.
Robin S.
-------------------------------------
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:O6**************@TK2MSFTNGP02.phx.gbl...
>
>Cor, you're talking about the TabIndex, right?
no .
dim mycontrolarray() as control = {Button1, TextBox2, TextBox4, Button2}
The indexes are in that case 0, 1,2,3
Cor
You can put them in an array yourself in the code behind the form, as Cor
has done in his example.
Robin S.
------------------------------------
"Lou" <lo********@comcast.netwrote in message
news:up**************@TK2MSFTNGP05.phx.gbl...
There is no index property of a button
I thought you could not have an array of controls in DotNet.
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:O6**************@TK2MSFTNGP02.phx.gbl...
>>
>>Cor, you're talking about the TabIndex, right?
no .
dim mycontrolarray() as control = {Button1, TextBox2, TextBox4, Button2}
The indexes are in that case 0, 1,2,3
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Karl Seguin |
last post by:
i have a dynamically created user control which contains a non-dynamically
created ASP.Net button. When the button is clicked, the event is not fired.
I know that the control must be created on...
|
by: John Crowley |
last post by:
I'm having an odd problem with viewstate and a dynamically created control
inside a repeater template.
Basically, I have a repeater setup like this in the aspx:
|
by: Sky |
last post by:
What I have currently:
I have a user control called mod_container.aspx that is basically two
divs -- the top a toolbar, that expands/collapse the second div which can
contain other...
|
by: Eric |
last post by:
I have built a composite user web control that I want to create dynamically.
The form will contain a variable number of these controls and as well some
of the contents of the user web control...
|
by: R Duke |
last post by:
I have tried everything I can think of to change the visible property
of a design time created control from a dynamically created control's
command event handler.
Here is the scenario.
I have...
| |
by: mef526 |
last post by:
I would like to reference a dynamically created control and I know the name.
I would like to use the following:
Dim strName as String = "txtControl1"
' This is the ".Name" used when textbox was...
|
by: Gummy |
last post by:
Hello,
I created a user control that has a ListBox and a RadioButtonList (and other
stuff). The idea is that I put the user control on the ASPX page multiple
times and each user control will...
|
by: EricW |
last post by:
I want to create my homepage completely dynamically, but when I create two
imagecontrols and want to position them, they won't move at all.
I've read some artikels about using the placeholder,...
|
by: Chris |
last post by:
I am dynamically adding a user control to each row in a gridview. The reason
I am doing it dynamically is the user control is different depending on
certain data in the gridview. The gridview...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |