|
Apologies - I should have specified that I am developing a WPF application. There doesn't seem to be an option to add an image, unless I am just missing it....Confused
|
|
|
|
|
With WPF your options are even greater, if I remember correctly. Take a look at some of the WPF articles here on CodeProject and you are bound to find some samples.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
It's easily done with WPF. See this[^] code snippet, for example.
/ravi
|
|
|
|
|
You can place virtually any control inside the button, even a listbox, datagrid or in your case an image. You all add them in the content property. In this case better specify the Content as an element instead of an attribute.
see MSDN for more details
V.
|
|
|
|
|
V. wrote: even a listbox, datagrid
Now that would look positively weird. But who knows? It might be useful in some odd application...
Will Rogers never met me.
|
|
|
|
|
i did it to practice wpf, but wouldn't use it in real life though.
V.
|
|
|
|
|
Hi,
I want to develop a multilingual report in Crystal Report 11 that will change text and number format according to culture...
Example: Price format:
For USA 39.99<br />
For Norway 39.99
New Text:
background:
I've developed an application in C# that is in two languages. 1. English and 2. Norwegian. There is a setting form where we can change software language. After this change language is changed on all pages and number format is also changed in the grids as well. because in usa decimal separator is dot (.) where as in norway decimal separator is comma(,). This is all working fine.
Problem:
Problem is with crystal reprts. I've also some report but they does not change with language change. Currently i'm doing this by developing two separate reports and calling according to current language but number format is still unchanged.
I need to know that how can we define this intelligence to Crystal Report to select appropriate decimal point with respect to language.
....
I think now problem is well clear???
Now I'm waiting for ur response.
Syed Shahid Hussain
modified on Wednesday, October 27, 2010 5:20 PM
|
|
|
|
|
I can't speak for the rest of the people on this website but...I'm in your corner and think you should do it.
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
|
|
|
|
|
Syed Shahid Hussain - others as well as I are not too sure what exactly you are trying to do.Try restructing your question, because at the moment it doesn't make much sense...Are you trying to develop an application that will convert from on currency to another? Please give more details so that we can better assist you...
|
|
|
|
|
Please have a look at the original message, I've emitted it completely.
Syed Shahid Hussain
|
|
|
|
|
Hi
I have a map of the Movie Clip and drag and drop commands and zoom to define it have. Vector map is designed. I want the child map is Movie Clip (Movie Clip to enlarge Father and transport capabilities added) to be divided into specific sections, and each point is assigned a number if the number of # C Let the sound of the zoom the map in any case the move is to come to the point where the middle of the page.
/ / I think if a vector on the map to create another layer and put an image into Raster pixel and transparency make it to zero percent, which is not seen, we can call each pixel with the desired result came out of that. / /
|
|
|
|
|
...and this has what to do with C#?
|
|
|
|
|
Either I have been smoking something really GOOOOOOD!!!, or this makes no sense whatsoever.. Could you clarify your question, please?
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
I am using the following code to populate xtraGrid from PostgeSQL but as you see I am using the data_table.Columns[0].ToString() and data_table.Columns[1].ToString() to refer to the columns because it's not accepting the "field_name"
what can I do to make refer to the field name by name only instead of the data_table.........!
sql_connection = new NpgsqlConnection(ConfigurationManager.ConnectionStrings["JassimSQL"].ConnectionString);
sql_connection.Open();
sql_command = new NpgsqlCommand("populate_personal_info_title2", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_adapter = new NpgsqlDataAdapter();
sql_adapter.SelectCommand = sql_command;
data_set = new DataSet();
DataTable data_table = new DataTable(); ;
sql_adapter.Fill(data_table);
cboTitle.Properties.ValueMember = data_table.Columns[0].ToString();
cboTitle.Properties.DisplayMember = data_table.Columns[1].ToString();
cboTitle.Properties.DataSource = data_table;
cboTitle.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo(data_table.Columns[1].ToString(), 50, "education_name"));
cboTitle.Properties.ShowHeader = false;
cboTitle.Properties.NullText = "UNSPECIFIED";
cboTitle.Properties.PopupSizeable = false;
cboTitle.Properties.PopupHeaderStyle.HAlignment = DevExpress.Utils.HorzAlignment.Default;
cboTitle.Properties.ShowFooter = false;
cboTitle.Properties.PopupWidth = 50;
|
|
|
|
|
How about:
cboTitle.Properties.ValueMember = data_table.Columns[0].ColumnName
|
|
|
|
|
no.
what i mean is like this:
cboTitle.Properties.ValueMember = "field_name"
|
|
|
|
|
That usually works just fine unless the field name is auto assigned or typed incorrectly. Try MessageBox.Show(dataTable.Columns[0].ColumnName) and see what you get as a result. Is it what you are expecting?
|
|
|
|
|
AFAIK you can identify grid columns by name once you have assigned their name to their Name (or ColumnName?) property.
|
|
|
|
|
Not sure about what your question is (I guess I still have to improve my English) but if it helps, ToString() method on a DataColumn object returns the same as its Expression property, it does not return its name.
|
|
|
|
|
Dear All --
I have a form in c#, consisting of say 1 combobox and 4 textboxes. Combobox will have values from 1 to 4 and the name of the textboxes be txt1, txt2,.. txt4. Depending on the value chosen in combobox, the txtboxes should hide or show.
Is something like the below code possible.
for (int i = 0; i < n; i++)
{
(TextBox)("txt" + i).Hide;
}
or is there some other better way of doing the same.
Sorry, if the subject name is not in lines with the body/matter.
cheers
|
|
|
|
|
the 4 textboxex are static or dynamic ? i mean you will have always those 4 textboxs or maybe change on 3 or 5 ?
|
|
|
|
|
On the Combox1 Selectedindexchanged Event (when you select a Value)
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
foreach (Control tb in this.Controls)
{
if (tb.Name == comboBox1.Text )
tb.Visible = false;
}
}
|
|
|
|
|
Try:
foreach (Control c in Controls)
{
TextBox t = c as TextBox;
if (t != null)
{
t.Hide();
}
}
If you want to select the text box(es) to hide in the ComboBox, then assign a numeric value to each TextBox.Tag property. You can then compare this to the numeric value in your combo box before deciding if you should hide or not.
Don't forget to reveal ones you have hidden already...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
This seems a fact unfamiliar to a lot of people, however even in WinForms you can easily get at a control by its name, like this:
Control c=this.Controls[name];
|
|
|
|
|
I'd forgotten that...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|