|
Hi,
Is there a property i can set on a treeview node that stops it being selected?
I've got a tree where i only want the leaves of the tree to be selectable and the rest of the tree to just be for navigating to those leaves. I'm currently setting the cancel property of the treeviewcancelevent object to true in the beforeselect event but it seems to behave a bit erratically on occasion.
any help / pointers to articles or properties i've just not seen would be much appreciated.
Thanks
Russell
|
|
|
|
|
I am trying to print out a basic report using the PrintDocument and have a few fields that are going to have to wrap.
My I know that I can define a style and print the text to the graphics object using the DrawString method and a defined rectangle but how am I supposed to know how big to define the rectangle in the first place?
I have found several tutorials on the web about this but they all seem bent on just showing you how the wrapping and trimming of the string works, not how to ensure that you can print a full string with wrapping in a rectangle.
|
|
|
|
|
Graphics.MeasureString() calculates the size that DrawString() would like to use.
The overloads without SizeF argument assume no word wrapping is going to happen
so what they return almost equals
new SizeF(string length*average char width, font height).
The overloads with SizeF argument allow you to specify a maximum width (and a real
or fictious max height) and also return the effective size, but now performing
word wrapping as is required to stay within the specified width.
So the trick is to give MeasureString() the SizeF that corresponds to the maximum
Rectangle you are willing to give DrawString().
Luc Pattyn
|
|
|
|
|
Darn... what I was looking for was a function that, given the font, text and allowed width would tell me the largest rect height I would need to hold all the text.
I got around it by working up on level a bit and defining a rect for the entire page so any text I would put in there will wrap. I know that all my text total will never be longer than one page can handle so as long as it all wraps to the next line I am ok there.
Thanks.
|
|
|
|
|
Hello,
I am using the final release of .NET 3.0 to create a WPF application containing several Expander controls.
These expanders are customized by a central style:
<Style TargetType="Expander">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="White" Offset="0.0"/>
<GradientStop Color="DarkGray" Offset="1.0"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
As reaction to the MouseEnter event I am trying to animate the background color inside the expander markup:
<Expander Name="accountExpander" [...]>
<Expander.Triggers>
<EventTrigger RoutedEvent="Expander.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX" From="1.0" To="1.2" Duration="0 .1"/>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" From="1.0" To="1.2" Duration="0 .1"/>
<ColorAnimation Storyboard.TargetProperty="Background.GradientStop[1].Color" From="DarkGray" To="SteelBlue" Duration="0 .1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Expander.Triggers>
</Expander>
Without the ColorAnimation the code is working perfectly, the problem seems to be property path for the Storyboard.TargetProperty. Before I switched to using central styles for the expanders I simply labeled the second gradientstop, which color I wanted to change, with the x:Name property. But as I declare the gradient stop inside a Style this is no longer possible. So i tried to use the longer property path syntax. According to the documentation it should be possible to access specific properties in an array-like fashion but the above code does not work for me.
Any ideas how I can animate the style-set property in my storyboard?
Thanks in advance
FalkoD
PS:
Somehow the board software seems to dislike XAML in its <code> tag so I hat to disable formating sorry for the ugly layout.
|
|
|
|
|
Hi everyone,
I have a textbox on a form with a Validating event handler attached. The textbox is bound to a data source. The code for the event handler is given below. Basically, the amount entered in the text field should not exceed the amount in the balance field. If this happens, error provider is set and Validating event is cancelled, giving the user the opportunity to correct the amount.
On the UI side e'thing is working fine, however I noticed that the data source is updated regardless, even if e.Cancel is set to true. That is a problem because the data source should never be set to an invalid value as it is taken as input for other calculations.
I expected that the data source would not be updated if e.Cancel is set to 'true'. Am I missing something?
Thanks,
Roel
private void textBoxCash_Validating(object sender, CancelEventArgs e)
{
if (Convert.ToDouble(textBoxCash.Text) > this.balance)
{
errorProvider.SetError(textBoxGenerateCash, "Cash exceeds balance");
e.Cancel = true;
}
else
{
errorProvider.SetError(textBoxCash, null);
}
}
|
|
|
|
|
I just want to know wich one is better for learning and better in 3D perfomance?
OpenGL or Direct3D?
and please introduce some refrences for each one
-- modified at 4:58 Thursday 4th January, 2007
|
|
|
|
|
Does anybody have a simple way to screen print from a VB.NET program? 've been looking and can't find a thing. Being new to VB, Maybe I'm trying to find the wrong things.
Thanks in advanced.
silver-gray
|
|
|
|
|
|
Hi all,
Can I get any .net developpped library with proper UI, which gives the same functionality as DSO Framer control thats to display and edit office doc, xls etc files. Because the DSO Framer control uses unmanaged code which gives problem in web applications when hosted in clients local machine. So I need any .net developped tool to get these functioanlities done. I tried with aspose, but to change the document again we need to change the code, or we have to fight with sumo to make it independent of document format. So please
help me in this. You can email me at : aleem_abdul@akebonosoft.com. My requirement is to display the word or excel files in a browser, allowing user to edit it there only. He can email it from that page itself only only. Remember this page should contain a tool bar which contains appopriate buttons for those functionalities. The problem when I use aspose is, it doesnt have UI so occupies total page and if I want to change the format of the file(document), I need to change the code. And the problem with DSO Framer control is(it has nice UI but) it has to be installed on the client machine because it contains unmanaged code. By observing all these things please advise me.
Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Anything you impliment, will need to be installed on a client machine. Moving from what you've found to something .NET, will just mean your client will need .NET installed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yes dear but when you keep an acxtiveX control in your application, you need to install it too. That my client doesnt want, because to run an activeX control in a browser ofcourse its security need to be less.
So my client want an application, which uses only .net library and .net controls in it. So I need a tool made using .net and works same as DSO Framer. Could you please help me in this. I was in urgent thats why I put my queries 2-times. I will delete them soon after I get the answer. So please help me dear.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: I will delete them soon after I get the answer.
Please don't, it's SO annoying. Just post in the right forum only, to start with.
indian143 wrote: So my client want an application, which uses only .net library and .net controls in it.
Is your client under the mistaken belief that .NET controls will just run in your browser ? They won't run at all, without the .NET framework installed. So, like I said, your end user will definately not be able to browse to your site without installing anything.
indian143 wrote: Could you please help me in this.
I answered your question, I can't change reality.
indian143 wrote: So please help me dear.
Just a little tip - in the West, guys don't call each other 'dear'. I am not upset or offended, but it's not a good habit to be in.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: indian143 wrote:
So please help me dear.
Just a little tip - in the West, guys don't call each other 'dear'. I am not upset or offended, but it's not a good habit to be in.
You metrosexual you.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Is your client under the mistaken belief that .NET controls will just run in your browser ? They won't run at all, without the .NET framework installed. So, like I said, your end user will definately not be able to browse to your site without installing anything.
No.
He is right from his side, try to understan my problem. Ocx is built using un-managed code. But if I could get any thing similar to DSO Framer, and made by using .net framework. Because, he will install .net framework but for ocx browser settings has to be changed. Thats what I want. Once again I am repeating.
"I want a UI(control like label, text box any thing) which is made by using .net frame work and contains the functionalities similar to DSO Framer. And remember activeX controls are really not good to use. Its true, they are not that much secured and reliable. They have hell lot of problems. So please help me. And reply me whether its possible or not too. Even discuss with your friends too. But reply me soon, I am waiting for you reply.
I use the word "Dear" because this forum has helped me in too many ways. I cant even forget those supports. Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi All,
Is There any way Add Extra Buttons to Title Bar in .net.
Plz Suggest me to get rid of this problem.
Thanks in advance
Nagaraju
|
|
|
|
|
|
is there a way of making .net framework portable?
|
|
|
|
|
What do you mean by "portable"?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The answer is probably, no. If you can explain what you mean, then I'd be happy to say no with more force
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I mean that you could have an application on a memory stick, plug it in and access a .net framework application without .net framework installed.
|
|
|
|
|
Nope. The .NET Framework MUST be installed to use an application that is based on it, meaning everything written in C#, VB.NET, or any other managed-code language targeting the .NET Framework.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
In a word document i've a paragraph. Programmatically i wants to check the spell and left side of each line of the paragraph i've to give the Error description.
In this above task,
I've done the spell check but i don't know how to generate error description in the left side of each line.
Any one can you help me?
Gopalakrishnan R (Software Engineer)
Ascendum Systems Pvt. Ltd
#90,II Main | Phase I | Electronics City | Hosur Rd | Bangalore 560100 | INDIA
Direct : 91.98801 98828
Office : 91.80.4135 9848
Email : Gopalakrishnan.R@ascendum.com
Web : www.ascendum.com
|
|
|
|
|
I'm running into a bug in the DataGridView control, which happens only in the Release version of my code (ie, doesn't happen in the debugger).
Is there a place where I can read about known bugs/issues with various .NET components, and/or report the problems I'm seeing?
Thanks!
|
|
|
|