|
For me it is working fine
sharath Chandra
|
|
|
|
|
I want a RowHeaderCell displaying a Value only and no glyphs whatsoever.
The problem i'm facing is the Selection glyph and the space the icons seem to claim.
Is there a DisableAllGlyphsAndReclaimSpace-property available I haven't discovered yet?
I also noticed a bunch of Non-Public members:
DATAGRIDVIEWROWHEADERCELL_contentMarginHeight up to DATAGRIDVIEWROWHEADERCELL_verticalTextMargin
I think they also have something to do with it.
|
|
|
|
|
Hello,
i have 2 problems
i've created a .Net hosted control library which should run with explorer, and it loads when i'm starting html page
but when it tries to work with files, Runtime throws an exception
1) Could you write how-to configure my DLL in .Net framework mmc
(it shows messages that strong name required and so on)
2) I have a public available
event OnCompile(string text)
and a public available variable
oncompile
but when i'm trying to add an event handler to my .Net control in Java script
like
document.supercontrol.oncompile = javascriptproc
function javascriptproc(text)
{
document.write(text);
}
it doesn't work
Thank's
|
|
|
|
|
Hi all,
depending on an access level of my app's I want to suppress a statechange of a radiobutton field (without disabling the controls). On a checkbox control I can override the onclick event and use the BeforeStateChange event.
A radiobutton doesn't have such an event.
Who has an idea to do that ?
tnx Frank
fracalifa
|
|
|
|
|
Hello,
You could still override OnClick, and use MouseDown as for the functionality of BeforeStateChange.
Or fire your own event in the OnClick Method.
All the best,
Martin
|
|
|
|
|
Hi,
dont know about BeforeStateChange event, it is not in my MSDN documentation.
Same MSDN documentation says one should not use RadioButton.OnClick
for RadioButtons you can set AutoCheck=false and do all the Checked logic
yourself.
I consider it bad practice to change the behavior of a standard Control:
a RadioButton (group) should either be enabled and you can operate it normally,
or disabled and you cant operate it at all. For me there is no way in between.
|
|
|
|
|
Hello Luc,
Luc Pattyn wrote: I consider it bad practice to change the behavior of a standard Control
I don't agree in this point, as I often manipulat standard Controls for my needs.
As "overriding" gives me the chance to change the behavior of controls in the way my "customer" is used to it from machines my company delivered years ago.
And I think the point is, as some people (including me) are not doing WEB Applications or standard Windows Application for PC's, your statement doesn't fit for all.
All the best,
Martin
|
|
|
|
|
Hi Luc,
you are right, sorry, I override the onclick event and created an own event called checkBeforeChange like this
protected override void OnClick(EventArgs e) <br />
{ <br />
if(this.BeforeStateChange != null)<br />
{<br />
this.BeforeStateChange(this, ref cancelStateChg);<br />
}<br />
if(this.cancelStateChg)<br />
{ <br />
this.Checked = !this.Checked;<br />
} <br />
base.OnClick (e);<br />
}<br />
this code is working on a checkbox, but not on a radiobutton.
I would use enable=true/false but the bad is the color change to gray. If I could prevent the colorchange, everything would be fine.
Frank
-- modified at 6:37 Thursday 12th July, 2007
|
|
|
|
|
I understand that, but the basic point is a Control that is disabled MUST
look different; if it did not, the user would manipulate it unknowingly,
and then complain it does not work as expected.
|
|
|
|
|
Hi luc
a disabled control should look different, but in a way I can decide of, and not in the way MS do.
tnx
|
|
|
|
|
Standards are fantastic. Everyone should have one.
|
|
|
|
|
A simple solution is to intercept checkchanged, and set the button back to checked if it is not checked.
Not the most elegant though
|
|
|
|
|
Hello,
fracalifa wrote per e-mail: Hi Martin,
tnx, that works, but how can I prevent the statechange of the radiobutton ? Is there a cancel option which I can use for?
Tnx Frank [confused]
I haven't even found "statechange", is it .NET>1.1?
P.S.: please respond in the forum, cause I'm not answering per e-mail!
All the best,
Martin
|
|
|
|
|
Hi Martin,
other than a checkbox a radiobutton is a group of controls. With the checkbox I can do suppressing the toggle of the state, with the radiobutton(s) I can do not.My wish is to prevent the change of state from uncheched to checked when clicking on it, that's all (without enable = false).
tnx Frank
|
|
|
|
|
But haven't you allready told the solution with overriding the OnClick.
I tested it with an inherited (from RadioButton) control.
private bool _disable = false;
public bool Disable
{
get
{
return _disable;
}
set
{
if(value!=_disable)
{
_disable = value;
}
}
}
protected override void OnClick(EventArgs e)
{
if(!Disable)
base.OnClick (e);
}
Works well for me.
All the best,
Martin
|
|
|
|
|
Yes, that's it,
my fault was the calling of the base class even when it is disabled.
tnx
|
|
|
|
|
Glad I could help!
You are wellcome!
All the best,
Martin
|
|
|
|
|
Hello there,
I have been asked to create a design surface where you can drag and drop controls onto this surface and it will automatically generate the XAML code , now the problem is i have never done this before, so if there is anyone who can help me with this it would be greatly appreciated.
thanks in advance
|
|
|
|
|
|
thanks for the reply,
im actually trying to create a custom IDE like VS that i can drag and drop controls onto a surface and the XAML code for those controls will be generated automatically,
|
|
|
|
|
Well yes, that's what Expression Blend does. It'll probably be cheaper to buy it than putting in vast amounts of time and trouble to create something similar.
Standards are great! Everybody should have one!
|
|
|
|
|
Expression Blend would work but we are looking to create a custom one that we can develop and deploy so that anyone can create a custom application simply by dragging controls onto a design surface
|
|
|
|
|
Hi,
I've created a timer object with these statements
private Timer stepTimer = new Timer();
stepTimer.Interval = 1000;
stepTimer.Tick += new EventHandler(stepTimer_Tick);
these statements are in my constructor.
when I call stepTimer.Start(); in the constructor it comes to the stepTimer_Tick method.
However, when I do that somewhere else (for example I am trying to call in another callback function)
it does not enter the function stepTimer_Tick.
I've taken the statement (stepTimer.Start(); ) to different locations but it is still the same. How can I solve that.
Thanks...
aysan ethem narman
|
|
|
|
|
Hello,
As you are using the Forms.Timer which is running in the UI thread, you have to be carefull when accessing it from an other thread.
In this case you have to invoke the method which calls the Timer like this.
private delegate void EnableTimerDelegate();
private void EnableTimer()
{
if(InvokeRequired)
{
Invoke(new EnableTimerDelegate(EnableTimer), new object[] {});
return;
}
if(!stepTimer.Enabled)
{
stepTimer.Enabled = true;
}
}
Invoke and InvokeRequired are members of Control.
Hope it helps!
All the best,
Martin
|
|
|
|
|
Hi,
Thank you very much it works.
Interesting thing is I've met cross thread operation many times before, I've caught them with try catch blocks and solved with invoke method as you did. However, this time it did not fire any exception although it is again in a try-catch block. So I did not doubt about this problem.
Again thank you...
aysan ethem narman
|
|
|
|