|
Nope. I've tried to survey the mystic nugget of knowledge and it's just not giving up its secrets. Without its help, I just cannot work out which technology you are talking about. Is it ASP.NET, WPF, Silverlight, WinForms, Magic 8 Ball?
|
|
|
|
|
|
|
In future, when asking questions about ASP.NET, could you please use this[^] forum then? The quick answer to your question would be to use CSS to govern the positioning of the image - I assume you have got stylesheets in place for your web pages.
|
|
|
|
|
sir, I have to explain you the whole scenario.
I am actually generating barcodes.
Now each cell have some information related with a product along with it's barcode generated at runtime.
Now please tell me how can I place this barcode image at a specific position in a cell using coordinates & coding in c#.
|
|
|
|
|
Member 8374202 wrote: Now please tell me how can I place this barcode image at a specific position in
a cell using coordinates & coding in c#.
You can still use CSS for this. I suggest that you take this over to the ASP.NET forum now.
|
|
|
|
|
ok, sir
thank you for giving your time to me.
|
|
|
|
|
And a 5 from me for such a polite reply. Well done.
|
|
|
|
|
ok sir
I will get back to you if many problem related to c# will arrive
|
|
|
|
|
cells? it must be MineSweeper then. He probably wants to put up new bombs and different flags.
|
|
|
|
|
Hai
I developing a software in c# i want to know how to write code for cute comboboxes for windows7.
anyone can help me please ?
Arunkumar
|
|
|
|
|
What do you mean by cute comboboxes for windows7?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
which frontend tech. you are using (WPF, Silverlight , etc.)?
"Insanity is doing the same thing over and over again but expecting different results.” — Rita Mae Brown
|
|
|
|
|
iam using .net as my desktop application framework
|
|
|
|
|
That is a web site, so you need to look at the options available within ASP.NET for creating drop down lists. There are lots of articles here on CodeProject that will offer suggestions.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Thank you for your valuable time
I thing u misunderstand my question!
iam not looking for a asp.net combo box. i want to integrate that type of combo box in my desktop application.
Thank you
Arunkumar
|
|
|
|
|
I'm not sure Winforms or even WPF allows this kind of theming natively. What you'll need to do is write your own usercontrol that inherits from the standard combobox. I think this usercontrol will consist of several standard controls:
- a textbox
- a button (that resembles the down arrow)
- an invisible panel, size: width = textbox, height = 0 (by default)
You then load this panel with the items (via labels or textblocks) and on click of the button the panel grows in size (at the position right below the textbox). When a label/textblock was clicked, the panel is closed again andf the text put in the textbox.
hope this helps.
PS: Please avoid text speech and mind the spelling (even if you're not native English)
V.
|
|
|
|
|
I was thinking the same.
|
|
|
|
|
Yeah, genius minds think alike
V.
|
|
|
|
|
ok guys
Thanks for your replays
Now i am facing another problem
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Combo
{
public class Combo
{
private System.Windows.Forms.ComboBox li = new System.Windows.Forms.ComboBox();
public void Addselect(Control FormName, string name, int top, int left, int width, int height, string Text)
{
li.Top = top;
li.Left = left;
li.Width = width;
li.Height = height;
li.Name = name;
li.FlatStyle = FlatStyle.Flat;
li.CreateGraphics();
li.Text = Text;
li.IntegralHeight = false;
li.MaxDropDownItems = 5;
li.DropDownStyle = ComboBoxStyle.DropDown;
li.Size = new System.Drawing.Size(136, 81);
li.BackColor = System.Drawing.Color.DarkGray;
FormName.Controls.Add(li);
}
public void Additems(string[] items)
{
li.Items.AddRange(items);
}
public bool Enabled
{
get { return li.Enabled; }
set { li.Enabled = value; }
}
public bool Visible
{
get { return li.Visible; }
set { li.Visible = value; }
}
}
}
Iam Creating a library for combobox.(iam a newbie to c#)
iam using this library for adding many combobox in my form
can any one tell me how to create a selectedindexchanged event handler for each combobox i creating?
i tried the commented code but i got a error like this
Error 1 The type 'Combo.Combo' already contains a definition for 'SelectedIndexChanged' D:\SelectboxLibrary\SelectboxLibrary\Class1.cs 47 22 SelectboxLibrary
Please Hep me
Arunkumar
|
|
|
|
|
Lots of suggestions here[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
WPF provides better styling support for controls.
|
|
|
|
|
Some replies here have assumed you are describing "theming:" (even though you never used that word, yourself): where theming means you want to create a control from which you could create any number of different look-and-feel variations from the base control.
Looking at your question: and the example on the web page you linked to: are you really asking how to create a custom-themed control, or are you just asking how to make a drop-down that looks and behaves exactly like the one on that web-page ?
Please clarify exactly what "style" and "styling" mean to you here.
best, Bill
"Last year I went fishing with Salvador Dali. He was using a dotted
line. He caught every other fish." Steven Wright
|
|
|
|
|
I have created a control based on System.Windows.Forms.TabControl. I am painting the entire control myself in order to paint custom tabs and such. This was created for in-house use and I have never had to use a TabControl in which the tabs extend the visible tab area. However, I would like to implement this in case I do need it in the future. However, when I shrink the control so that the left/right scroll buttons appear at the top-right, the tabs do not display correctly.
Here is the code I currently have for drawing the tabs, which works perfectly when there is no scrolling involved:
int tabX = 4;
int tabY = 4;
foreach (TabPage page in this.TabPages)
{
SizeF textSize = g.MeasureString(page.Text, this.Font);
Rectangle tabRect = new Rectangle(tabX, tabY, ((int)textSize.Width + 16), ((int)textSize.Height + 8));
LinearGradientBrush tabBrush = new LinearGradientBrush(tabRect, ThemeManager.Instance.CurrentTheme.FormBackgroundColor,
ThemeManager.Instance.CurrentTheme.ButtonBackgroundDark, 90.0f);
g.FillRectangle(tabBrush, tabRect);
if (this.SelectedTab == page)
g.DrawRectangle(new Pen(ThemeManager.Instance.CurrentTheme.SelectedItemBorderColor), tabRect);
else
g.DrawRectangle(new Pen(ThemeManager.Instance.CurrentTheme.ToolStripBorderColor), tabRect);
StringFormat format = new StringFormat();
format.Alignment = StringAlignment.Center;
format.LineAlignment = StringAlignment.Center;
System.Drawing.Font font;
if (this.SelectedTab == page)
font = new System.Drawing.Font(this.Font, FontStyle.Bold);
else
font = this.Font;
g.DrawString(page.Text, font, Brushes.Black, tabRect, format);
tabX += (tabRect.Width + 4);
}
I know the code is a bit messy but right now I just want it to display correctly. This is mostly because I have never done this before so I am just trying to figure out how to make it LOOK right. Am I missing something here? I have looked at a few articles here on CodeProject which draw custom tabs. But I could not find anything in the code that handles this. I know it was done, I simply could not find where.
Any advice is appreciated. Thanks!
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|