A
Ali Eghtebas
Hi,
I wanted to insert linebreaks in the tooltip property of some of my
controls.
I simply altered the designer generated code in InitializeComponent:
Me.MyTooltip.SetToolTip(Me.TextBox1, "Text line 1" & vbCr & "Text line 2.")
But whenever I change back to desinger I get this error in the Task List:
"The variable 'vbCr' is either undeclared or was never assigned."
I've encountered similar problem before when I've e.g. inherited the data
grid textbox and used the altered data grid textbox within a datagrid and
the designer always deleted the code related to the inherited data grid
textbox. In this case I just had no choice but to put the related code in
sub new of the form.
I even tried something like this:
Private strToolTip As System.String
Me.strToolTip = New System.String("Text line 1" & vbCr & "Text line 2.")
Me.MyTooltip.SetToolTip(Me.TextBox1, Me.strToolTip)
But then I get the error: "The variable 'strToolTip' is either undeclared or
was never assigned."
It seems to me that you can't even declare a variable and use it
InitializeComponent sub.
I sure could put the code in sub new of the form or in form load, to get it
work but this is not about that. I simply want to know how to get it work
straight within InitializeComponent.
I tried everythink to get it work but no success! This is strange behaviour!
Isn't it?
Am I missing something here?
I wanted to insert linebreaks in the tooltip property of some of my
controls.
I simply altered the designer generated code in InitializeComponent:
Me.MyTooltip.SetToolTip(Me.TextBox1, "Text line 1" & vbCr & "Text line 2.")
But whenever I change back to desinger I get this error in the Task List:
"The variable 'vbCr' is either undeclared or was never assigned."
I've encountered similar problem before when I've e.g. inherited the data
grid textbox and used the altered data grid textbox within a datagrid and
the designer always deleted the code related to the inherited data grid
textbox. In this case I just had no choice but to put the related code in
sub new of the form.
I even tried something like this:
Private strToolTip As System.String
Me.strToolTip = New System.String("Text line 1" & vbCr & "Text line 2.")
Me.MyTooltip.SetToolTip(Me.TextBox1, Me.strToolTip)
But then I get the error: "The variable 'strToolTip' is either undeclared or
was never assigned."
It seems to me that you can't even declare a variable and use it
InitializeComponent sub.
I sure could put the code in sub new of the form or in form load, to get it
work but this is not about that. I simply want to know how to get it work
straight within InitializeComponent.
I tried everythink to get it work but no success! This is strange behaviour!
Isn't it?
Am I missing something here?