|
Member 4290118 wrote: can naybody suggest me how to custom code the page settings in report viewer.
Well I never worked with ReportViewer but if I had your problem I would start by reading the documentation. I know that seems old fashioned and you new guys don't agree with that approach but I guess the old saying is true: You can't teach an old dog bad practices.
led mike
|
|
|
|
|
Hi there.
I am trying to make a composite user control in VB.net that has a trackbar/slider and a few few buttons to set values on the the slider. The slider itself is a custom user control which is referenced in my project (so is a self contained user control). The buttons work fine, and i can set the value of the slider correctly via the user control. I was unsure about the value changed event on the slider since that is a referenced object. I want the value property of my user control to change when the slider is moved, but I don't know how to link the slider's valuechanged event to this. I hope that i've explained this properly.
many thanks, Peter
modified on Thursday, April 3, 2008 2:36 PM
|
|
|
|
|
You need to implement the INotifyPropertyChanged interface see link below
http://msdn2.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx
Sk8tZ
|
|
|
|
|
hi,
I have a question which how could i call a control (example show image at formA.PictureBox) on from other form?In VB i can call like formA.image.visible = true...But how can i do in c# window form?
Any tips are welcome
regards
cocoon
|
|
|
|
|
Exactly the same... don't forget to set the modifier of the picturebox to public... This is not a neat way by the way... You can better create a property on FormA
<br />
public bool PictureVisibility<br />
{<br />
get { return image.Visible; }<br />
set { image.Visible = value; }<br />
}<br />
|
|
|
|
|
You have to use delegates to communicate between forms. CP has an article explaining this. Search for it
|
|
|
|
|
cocoonwls wrote: I have a question which how could i call a control (example show image at formA.PictureBox) on from other form?In VB i can call like formA.image.visible = true...But how can i do in c# window form?
Simple answer. Don't. It's a bad design and a really dirty hack.
Consider using a pattern such as the Model View Controller pattern to handle this. Your code will end up being more robust, and won't be so intertwined with variable names.
|
|
|
|
|
hi, Pete O'Hanlon,
First of all, i would like to thanks to those who answer my qustion. I am interesting in "Model View Controller" pattern, could you please give me an example depend on my case and some simple explanitation? Off course, i will do a research on this pattern.
Thanks in advanced
regards
cocoon
|
|
|
|
|
Coccoon - I'm pleased to see you wanting to take a more indepth look. It's hard to break MVC down to a really simple pattern, but this[^] article is a highly in-depth overview of the process.
|
|
|
|
|
How to Bind Controls in GridView in VB.Net or C#.Net (Windows Application)
Can Any One help me to sort out this..
|
|
|
|
|
|
Hi Adams,
Thanks yaa...
I hve gone thru the link which u sent.It's working.But for Binding controls in datagrid is thier any necessity to write this much code.Correct me if im wrong
Regds
Krish Vignesh
|
|
|
|
|
I sort of have databinding working with a set of Radio buttons in a winforms group box.
I have implemented a class with that extends INotifyPropertyChanged with seperate properties for each radio button (Demo below).
On my form I have grouped the radio buttons into a group box so that only one button can be selected at a time. Then under DataBindings I have used the advanced option to set the "checked" value and the data source update mode to "OnPropertyChanged".
The problem that I am having is that each change in selection requires the user to click twice on the destination radio button to make a selection.
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
namespace PizzaOrder
{
class OrderData : INotifyPropertyChanged
{
public OrderData()
{
m_largePizza = true;
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
#endregion
private bool m_smallPizza = false;
public bool SmallPizza
{
get { return m_smallPizza; }
set
{
if (m_smallPizza != value)
{
m_smallPizza = value;
OnPropertyChanged("SmallPizza");
}
}
}
private bool m_mediumPizza = false;
public bool MediumPizza
{
get { return m_mediumPizza; }
set
{
if (m_mediumPizza != value)
{
m_mediumPizza = value;
OnPropertyChanged("MediumPizza");
}
}
}
private bool m_largePizza = false;
public bool LargePizza
{
get { return m_largePizza; }
set
{
if (m_largePizza != value)
{
m_largePizza = value;
OnPropertyChanged("LargePizza");
}
}
}
}
}
|
|
|
|
|
Hi,
I have a strainge requirement.
I have a panel which has several sub panel controls.
Now I want a list of sub panes for that I wrote "For each ctrl as Control in pnlMain.Controls" loop which is working fine but it is fetching random control not in proper order.
Is there any was that will give me list of sub controls order by their location i.e. x,y. It should retrived from left to right like the one which is on left and top most should be retrived first after that the one which is right to first one and so on...
Help me out.
Thank you in advanced.
|
|
|
|
|
Erhm, 'For Each' loops do not guarantee to retrieve objects from a collection in 'the correct' order.. However, a 'for' loop does...
<br />
For (int iControlCount = 0; iControlCount < pnlMain.Controls.Count; iControlCount++)<br />
{<br />
Control childControl = pnlMain.Controls[iControlCount];<br />
}<br />
However, since you want to retrieve the controls depening on their location, this loop still doesn't work, because the For loop will retrieve all controls in order they were added to pnlMain...
You should loop through the controls and then compare the left & top properties and sort them accordingly..
|
|
|
|
|
Yes i have wrote a sequantial sort logic for getting them in order.
Thanks.
|
|
|
|
|
Hello
I am having a button
When we place a mouse Pointer on that button then a drop down list appear
When we remove the mouse button then disappear
Please post me the answer as early as possible its urgent
|
|
|
|
|
create the onmouseover() event
|
|
|
|
|
vvsprasad wrote: I am having a button
Wow. A lot of people I know are having boys or girls. You really want to get your story published in a medical journal.
vvsprasad wrote: Please post me the answer as early as possible its urgent
When is it never urgent. And no - I'm not going to.
Finally - have you looked at the name of the forum? Do you really think this is the most appropriate place to post this question?
|
|
|
|
|
This entire thread...priceless
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: This entire thread...priceless
It is good isn't it?
|
|
|
|
|
Pete O'Hanlon wrote: vvsprasad wrote:
I am having a button
Wow. A lot of people I know are having boys or girls.
Best response ever!
|
|
|
|
|
Actually it reminds me of when I was learning Spanish. I was standing in line at a McDonalds and I was practicing with my (then) Spanish girlfriend and I said "Voy a tener un Big Mac" (Lit. I am going to have a big mac) and she burst into a fit of giggles. It seems that I said I was going to give birth to a big mac. What I should have said was "Voy a tomar un Big Mac" (Lit. I am going to take a big mac).
|
|
|
|
|
Colin Angus Mackay wrote: (Lit. I am going to take a big mac).
Is this what leads to :
Colin Angus Mackay wrote: It seems that I said I was going to give birth to a big mac
?
Man - what an image that brings to mind.
|
|
|
|
|
Hello Friend!
I've built a windows application.
now I want to show any gif image while system is busy to save data in data base. after completing save operation the image will be invisible. again it will be visible during saving data.
How can I do this?
Please, help me.
Thanks!!!!!!!!!!
|
|
|
|