473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

modifying standart textbox

hello...

i coded these:

public class TextBoxBrowse : TextBox
{
public TextBoxImgBrowse () : base ()
{
Button b = new Button();
b.Size = new System.Drawing.Size(24, 21);
b.Dock = DockStyle.Left;
b.Text = "...";
b.Click += new EventHandler(b_Click);
this.Controls.Add (b);
}
}

so as you see the standart textbox will now have button on it, the problem
is what in some cases text will be hidden under thet button, how can i solve
that problem, then staying under textbox, i mean that TextBoxBrowse must be
declared like "TextBoxBrowse : TextBox"
Nov 16 '05 #1
4 1242
Hi,
This is not the best way of doing it, you should inherint from Control and
then insert both controls as needed.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"David" <da*******@hotmail.com> wrote in message
news:uL*************@TK2MSFTNGP12.phx.gbl...
hello...

i coded these:

public class TextBoxBrowse : TextBox
{
public TextBoxImgBrowse () : base ()
{
Button b = new Button();
b.Size = new System.Drawing.Size(24, 21);
b.Dock = DockStyle.Left;
b.Text = "...";
b.Click += new EventHandler(b_Click);
this.Controls.Add (b);
}
}

so as you see the standart textbox will now have button on it, the problem
is what in some cases text will be hidden under thet button, how can i solve that problem, then staying under textbox, i mean that TextBoxBrowse must be declared like "TextBoxBrowse : TextBox"

Nov 16 '05 #2
in 99% of cases i'll accept with you, i need to add this my control to
TextBoxex collection, so the only way to do it is to inherit from TextBox...
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:ey**************@TK2MSFTNGP10.phx.gbl...
Hi,
This is not the best way of doing it, you should inherint from Control and
then insert both controls as needed.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"David" <da*******@hotmail.com> wrote in message
news:uL*************@TK2MSFTNGP12.phx.gbl...
hello...

i coded these:

public class TextBoxBrowse : TextBox
{
public TextBoxImgBrowse () : base ()
{
Button b = new Button();
b.Size = new System.Drawing.Size(24, 21);
b.Dock = DockStyle.Left;
b.Text = "...";
b.Click += new EventHandler(b_Click);
this.Controls.Add (b);
}
}

so as you see the standart textbox will now have button on it, the
problem
is what in some cases text will be hidden under thet button, how can i

solve
that problem, then staying under textbox, i mean that TextBoxBrowse must

be
declared like "TextBoxBrowse : TextBox"


Nov 16 '05 #3
Hi,

Do you have to use a TextBox collection ??

why not use a Control collection?

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"David" <da*******@hotmail.com> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl...
in 99% of cases i'll accept with you, i need to add this my control to
TextBoxex collection, so the only way to do it is to inherit from TextBox...

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote in message news:ey**************@TK2MSFTNGP10.phx.gbl...
Hi,
This is not the best way of doing it, you should inherint from Control and then insert both controls as needed.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"David" <da*******@hotmail.com> wrote in message
news:uL*************@TK2MSFTNGP12.phx.gbl...
hello...

i coded these:

public class TextBoxBrowse : TextBox
{
public TextBoxImgBrowse () : base ()
{
Button b = new Button();
b.Size = new System.Drawing.Size(24, 21);
b.Dock = DockStyle.Left;
b.Text = "...";
b.Click += new EventHandler(b_Click);
this.Controls.Add (b);
}
}

so as you see the standart textbox will now have button on it, the
problem
is what in some cases text will be hidden under thet button, how can i

solve
that problem, then staying under textbox, i mean that TextBoxBrowse
must be
declared like "TextBoxBrowse : TextBox"



Nov 16 '05 #4
couse, i need to use some properties only textbox have...

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:%2***************@tk2msftngp13.phx.gbl...
Hi,

Do you have to use a TextBox collection ??

why not use a Control collection?

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"David" <da*******@hotmail.com> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl...
in 99% of cases i'll accept with you, i need to add this my control to
TextBoxex collection, so the only way to do it is to inherit from

TextBox...


"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>

wrote
in message news:ey**************@TK2MSFTNGP10.phx.gbl...
> Hi,
>
>
> This is not the best way of doing it, you should inherint from Control and > then insert both controls as needed.
>
> Cheers,
>
> --
> Ignacio Machin,
> ignacio.machin AT dot.state.fl.us
> Florida Department Of Transportation
>
>
>
> "David" <da*******@hotmail.com> wrote in message
> news:uL*************@TK2MSFTNGP12.phx.gbl...
>> hello...
>>
>> i coded these:
>>
>> public class TextBoxBrowse : TextBox
>> {
>> public TextBoxImgBrowse () : base ()
>> {
>> Button b = new Button();
>> b.Size = new System.Drawing.Size(24, 21);
>> b.Dock = DockStyle.Left;
>> b.Text = "...";
>> b.Click += new EventHandler(b_Click);
>> this.Controls.Add (b);
>> }
>> }
>>
>> so as you see the standart textbox will now have button on it, the
>> problem
>> is what in some cases text will be hidden under thet button, how can i
> solve
>> that problem, then staying under textbox, i mean that TextBoxBrowse must > be
>> declared like "TextBoxBrowse : TextBox"
>>
>>
>
>



Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Shestero | last post by:
Hello. I have three question about ofstream and ifstream. 1. I have a function that writes some text-output into ofstream. The reference to that ofstream it got as a parameter. I have no...
10
by: heinquoi | last post by:
Hello, I have some problemes with microsoft windows programming. Could you help me ? I would the URL of the C++ last standart. thank for your answer. Heinquoi
7
by: Lloyd Dupont | last post by:
I'm about to buy VS.NET2005 standart edition which fits my need very well. What would be better though (cheaper and same feature, but I haven't tried) is to buy C++ express & C# express. If I buy...
2
by: Nomen Nescio | last post by:
Hi I've been trying to add a control dynamically to my page in order to pass a value to some client side script. I've solved that problem with a different approach now but I'd still like to...
6
by: JohnR | last post by:
I have a table with 1 row which is used to hold some application wide items (one item per field, hence I only need 1 row). I want to bind one of the fields to a textbox. After setting up the...
2
by: Lloyd Dupont | last post by:
When .NET 2.0 get out I ordered VS2005 Standart edition and downloaded all the express line. + the platform SDK. I had to modify some VS environment setting IN VCExpress so it could find the...
14
by: jehugaleahsa | last post by:
I have a rather complex need. I have a class that parses web pages and extracts all relevant file addresses. It allows me to download every pdf on a web page, for instance. I would like to...
1
by: kcddoorman | last post by:
I have searched all over the internets for a solution to this problem and there are many ways to work around it but I'm wondering if there is a more simple solution. I have asp.net 2.0 working with...
4
by: Sean | last post by:
I have a situation whereby I need to modify the text string appearing on an ASP button with some text derived from a Javascript function. But I am unsure of the correct syntax to do so. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.