|
What do you mean by "real time"?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Meaning I worked on one such form and I tried to create my own code for accordion. But my form has only label as control. If I add more controls, I do not know how to proceed for accordion. Real time meaning: which has most used the controls in the form like combo box, listbox, button etc
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
I'm sorry, but I'm having trouble understanding what you are trying to do, or where you are stuck.
Perhaps some code would help; or a picture
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
OK let me put this again Clear. You must be knowing for Accordion in Web applications work.
I want a similar one in windows. I already did try. But If my panel has any other controls other than Label, it doesn't work. Could not figure it out how to achieve this with all the controls in the panel.
Here is the code that will act labels click as accordion
Private Sub ButtonClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click, Label3.Click, Label5.Click
Dim lbl As Label = CType(sender, Label)
Dim pnl As Panel = lbl.Parent
For Each p As Panel In TableLayoutPanel1.Controls
Dim l As Label = CType(p.Controls(0), Label)
If p.Equals(pnl) Then
If p.Height = 150 Then
p.Height = 25
l.ForeColor = Color.Black
Else
p.Height = 150
l.ForeColor = Color.Black
End If
Else
p.Height = 25
l.ForeColor = Color.Black
l.Image = My.Resources.arrow
End If
Next
End Sub
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
Something like this?
Easy WinForms Accordion Control[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yeah I have already been there.
But if my panel has button/ Textbox or any other controls I do not understand how to proceed further.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
I'm not speak english well I'm speak french very well. but i went to speak in french.
ok Je conçoit actuellement une application de gestion avec vb.net mais g ne parvient pas a faire les impressions.je veux de l'aide pour pouvoir imprimer les etas contenant des datagrid.merci
|
|
|
|
|
My French is limited to "Je suis un croissant"
Still, according to the headline you'd want to print a datagrid with VB.NET, which sounds reasonable enough. There's an article here[^] that targets VB, but most documentation and examples would be in English, not in French.
Out of curiousity; what country are you from?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I come from cote d'ivoire (ivory coast)
|
|
|
|
|
Member 11630648 wrote:
I come from cote d'ivoire (ivory coast) Cool
The forums are primarily based on English*. Having a single language makes it easier for all, as it means we need not translate all technical documents. It has the added benefit that we can communicate regardless of the official language in the country. I'm going to assume English was the natural choice, being the simplest (or most widespread) of the bunch.
Your headline was fine. If you're unsure, use Google Translate.
*) with two major exceptions
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi There,
I'm about to make a small application Windows Form/C# to keep different kind of informations such as passwords credit card info etc.
It is rather simple with a treeview on the left side and a listview on the right side.
Now I implement 'Search' and 'Find next' and it works fine so far in both views. However when I find and highlight a hit in a listview subitem the entire cell (background) is highlighted but I only want to highlight the text itself.
(I would like to add some screen shots but I don't know how to do it).
Any ideas how to solve this (code example are very much appreciated)?
Thanks in advance,
|
|
|
|
|
iWonderHow wrote: Any ideas how to solve this You'll have to draw it yourself.
iWonderHow wrote: code example are very much appreciated Available on MSDN[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Take a look here[^]
This control can do all that... And a whole lot more! You will have to completely redo anything already using a list view, though, but the added power and flexibility is well worth it.
Just take note of the license being GPLv3.
I have used this control before, and it is AWESOME!
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Hi Brisingr,
Thanks for your reply. I have already had a look at ObjectListView but I discarded it because it also carries a lot of code that I do not need - I hoped for something more simple.
But you may be right that it is no other alternatives to do a lot of hard coding myself.
Anyway I will once again consider to use it.
Thanks ,
|
|
|
|
|
Yeah, it is a rather heavy control. But I cut out about 65% of the code in the application I was using it for, so that is a big win. (Yes, 65% of the code was for handling list view related operations, and I was only about 30% done with the program!)
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Hey, I am new to GUI programming
While trying to design a dialog box that gets user input and saves it to a file on clicking the save button, I ran into this error.
[code]
using System.Windows.Forms;
using System.Drawing;
using System.IO;
using System;
public class Mfury : Form
{
public Mfury()
{
Size = new Size(800,500);
Text = "Enter details of the book";
Label xo = new Label();
xo.Text = "Name : ";
xo.Location = new Point(10,10);
xo.Width = 50;
xo.Parent = this;
TextBox to = new TextBox();
to.Parent = this;
to.Location = new Point(90,10);
to.Width = 600;
to.Multiline = false;
string Var1 = to.Text;
Label x1 = new Label();
x1.Text = " ISBN : ";
x1.Width = 50;
x1.Location = new Point(10,50);
x1.Parent = this;
TextBox t1 = new TextBox();
t1.Parent = this;
t1.Location = new Point(91,43);
t1.Width = 600;
t1.Multiline = false;
string Var2 = t1.Text;
Label x2 = new Label();
x2.Text = "Key Words :";
x2.Width = 80;
x2.Parent = this;
x2.Location = new Point(10,90);
TextBox t2 = new TextBox();
t2.Parent = this;
t2.Location = new Point(91,83);
t2.Width = 600;
t2.Multiline = false;
string Var3 = t2.Text;
Button bo = new Button();
Button b1 = new Button();
bo.Parent = this;
b1.Parent = this;
bo.Location = new Point(520,350);
bo.Text = "Save";
bo.Height = 100;
bo.Width = 100;
Controls.Add(bo);
b1.Location = new Point(630,350);
b1.Text = "Close";
b1.Size = new Size(100,100);
Controls.Add(b1);
bo.Click += new EventHandler(onsave);
b1.Click += new EventHandler(onExit);
}
void onsave(Object Sender,EventArgs e)
{
FileStream fs = new FileStream("test.txt",FileMode.OpenOrCreate,FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine(to.Text);
sw.WriteLine(t1.Text);
sw.WriteLine(t2.Text);
sw.Close();
}
void onExit(Object Sender,EventArgs e)
{
Close();
}
public static void Main()
{
Application.Run(new Mfury());
}
}
[\code]
|
|
|
|
|
What error, and where does it occur? Also, please use <pre> tags around your code, not [code] . You can do it automatically by selecting all the lines in your post, and using the code button at the top of the edit box.
|
|
|
|
|
An easy idea would be, "you need to create a variable with that name, or you need to see if variable name has any typos".
Secondly, as already mentioned. [code][\code] is supported on some websites, such as Quora. On CodeProject, you have to embed your code inside <pre> tags, or you can try out using the new Markdown[^] on CodeProject.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Hello;
I am seeking a joystick-alike windows forms control that is free to implement some directional mooving in my windows form..with no success.
please can any one help me find this.
|
|
|
|
|
|
Hi, I have a gridview where the first column is a checkbox. When I open the grid, the value of the first checkbox is always false, no matter how it is initialized. When I select another cell, the correct state appears. How could I have the correct value be shown?
|
|
|
|
|
Without seeing some of your code it is impossible to guess why this may be happening. How do you initialise the checkbox?
|
|
|
|
|
ok, here is my intitialization:
foreach (Linie lrow in ud.Linien)
{
LLinGrid.Rows.Add();
DataGridViewRow gr = LLinGrid.Rows[LLinGrid.NewRowIndex - 1];
gr.Cells["global"].Value = Convert.ToString(lrow.Global);
gr.Cells["ust"].Value = Convert.ToString(lrow.Ust);
gr.Cells["kennung"].Value = Convert.ToString(lrow.Kennung);
if ((lrow.Kennung & 0x80) != 0)
gr.Cells["isuz"].Value = true;
if ((lrow.Kennung & 0x40) != 0)
gr.Cells["aktiv"].Value = true;
gr.Cells["dir"].Value = Convert.ToString(lrow.Dir);
gr.Cells["xmit"].Value = true;
}
if I move the "xmit" column from position 1 to >2, it works. I tried:
LLinGrid.ClearSelection();
LLinGrid.Rows[0].Cells[1].Selected = true;
LLinGrid.Invalidate();
LLinGrid.InvalidateCell(LLinGrid.Rows[0].Cells[0]);
LLinGrid.Show();
LLinGrid.UpdateCellValue(0, 0);
All of those didn't show the desired result. The value for the checkbox in the first column stays unchecked until I move to the next cell.
this happens only in the first row; follwing rows are correct.
|
|
|
|
|
Got it. I had
this.Show();
positioned before the initialization block above. This raises the BeginEdit event for the first cell which seems to prevent the altering via program.
There are 2 ways to solve this:
move
this.Show();
or insert
LLinGrid.EndEdit();
behind initialization,
Thanx for your interest.
|
|
|
|