|
what do u mean by before or after?!!!
<br />
private void listbox1_DrawItem(objectsender,System.Windows.Forms.DrawItemEventArgs e)<br />
{<br />
<br />
this.listbox1.RightToLeft=RightToLeft.Yes;<br />
<br />
}
|
|
|
|
|
do u try set this.listbox1.RightToLeft=RightToLeft.Yes; when you initialize the listbox control?
|
|
|
|
|
I tried it before, but it didnt work.
|
|
|
|
|
may be you need contact MS support.
|
|
|
|
|
Are you eventually using Windows 98 or Millenium Edition? MSDN says that the ListBox.RightToLeft property has no effect on these platforms.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
Hmm, in this case I think it has something to do with your custom implementation. If I drop a new ListBox onto my Form and assign RightToLeft.Yes everything works fine.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Do u use any drawitem event for your list box and set Drowmode in the listbox properties window to "OwnerDrawFixed", the righttoleft wont work !!!
try it .
|
|
|
|
|
No just dragged onto my form from the toolbox. As I said it has something to do with your implementation. If your drawing the items yourself, you have to care about the RightToLeft yourself.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I found it myself :
use these codes in DrawItem event of the listbox
StringFormat salign= new StringFormat() ;<br />
salign.Alignment=StringAlignment.Far;<br />
Font font=new Font("Tahoma",8,System.Drawing.FontStyle.Bold);<br />
Brush Author_default=Brushes.SaddleBrown;<br />
e.Graphics.DrawString("aaaa",font, Author_default,e.Bounds,salign);
|
|
|
|
|
Hello guys,
I've problem to open SCSI tape device from C#.
I want to work with it in "old way", I mean to create
handle to file ( device file ), then to open stream,
and to perform read/write operations.
1) First problem is that I don't know device file name ( where can I find it )?
2) The second question , is there another way to work with SCSI tape device, I mean is there infrustructure in .NET 2.0 to read/write directly to SCSI tape
|
|
|
|
|
did you get the answer?
I'm exactly in the point that you've mentioned but 6 years later.
|
|
|
|
|
Hi
Help me please
I could change color the rectangular which is showed when an item in listbox is focused, but while the selected item is changing , the color change into a blue again and after a while change into the color which I set for it.
I dont want this changing, what can I do ?!!
|
|
|
|
|
can you post some code which contain your problem?
|
|
|
|
|
I found it myself.
i was because of this code= e.DrawBackground().
Thanks
|
|
|
|
|
using VS2005;
I'm having trouble getting my mind around dataviews and datatables .
I have a datatable filled with * and has columns ID,Credit,Date,Description,Amount. I want to use the data in that datatable in several places in my program.
What I want to do is use a datagrid to display rows that are:
a) sorted in date order
b) rows are selected from the datatable because they fall into a programable date range and the Credit column value is true.
c) only some columns are displayed in the datagrid.
Will it be necessary to create another datatable programatically (in order to achieve (b) above) or is it possible to extract the data from the current datatable that holds all the data I want and then stick that selected data into the dataview?
TIA.
-- modified at 23:37 Saturday 12th August, 2006
-- modified at 23:38 Saturday 12th August, 2006
Glen Harvy
|
|
|
|
|
Hi friends,
I have one use control, which have one DATAGRID and control to uplaod (HTML where input type=file). When you upload file, (1) it will save file in the server folder (2) shows in the GRID within LinkButton. So one click on the linkbutton (FileName), able to save/Open file.
Code for this is.
----------------------------------------------------------------
FileStream MyFileStream = new FileStream(baseAttachementsPath + FileToOpen , FileMode.Open ,FileAccess.Read,FileShare.Read);
long FileSize;
FileSize = MyFileStream.Length;
byte[] Buffer = new byte[(int)FileSize];
int bytesRead = MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);
MyFileStream.Close();
Response.Buffer=true;
Response.Clear();
Response.Charset = "UTF-8";
Response.ContentType = "application/octet-stream"; Response.AppendHeader("content-length", FileSize.ToString() );
Response.AddHeader( "content-disposition","attachment; filename=" + FileToOpen);
Response.Flush();
Response.BinaryWrite(Buffer);
Response.End();
-------------------------------------------------------------------------
So this code is working for all file but not for text file.
When we try to open the text file, it will have all content with the source code for page. (source code is that for my current .aspx, and if i do view->source)
so if i have data in text file is "TEST FILE",
so when try to open / save ..
it contains...
==========
Test File
meta content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema>
<title>HP Direct Customer Addresses Registration Form
etc....
==================
Code is giving only for TEXT, else for DOC,PDF,xls working fine.
Can you help me?
Thanks in advance..
naishadh
|
|
|
|
|
Hi friends,
I have one use control, which have one DATAGRID and control to uplaod (HTML). When you upload file, (1) it will save file in the server (2) shows in the GRID within LinkButton. So one click on the linkbutton (FileName), able to save/Open file.
Code for this is.
----------------------------------------------------------------
FileStream MyFileStream = new FileStream(baseAttachementsPath + FileToOpen , FileMode.Open ,FileAccess.Read,FileShare.Read);
long FileSize;
FileSize = MyFileStream.Length;
byte[] Buffer = new byte[(int)FileSize];
int bytesRead = MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);
MyFileStream.Close();
Response.Buffer=true;
Response.Clear();
Response.Charset = "UTF-8";
Response.ContentType = "application/octet-stream"; Response.AppendHeader("content-length", FileSize.ToString() );
Response.AddHeader( "content-disposition","attachment; filename=" + FileToOpen);
Response.Flush();
Response.BinaryWrite(Buffer);
Response.End();
-------------------------------------------------------------------------
So this code is working for all file but not for text file.
When we try to open the text file, it will have all content with the source code for page. (source code is that for my current .aspx, and if i do view->source)
so if i have data in text file is "TEST FILE",
so when try to open / save ..
it contains...
==========
Test File
meta content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema>
<title>HP Direct Customer Addresses Registration Form
etc....
==================
Code is giving only for TEXT, else for DOC,PDF,xls working fine.
Can you help me?
Thanks in advance..
naishadh
|
|
|
|
|
I think you would have to change the MIME type depending on the file type. Try
Response.ContentType = "text/plain";
|
|
|
|
|
Thanks for the Reply.
But i have done that. It's working in my local machine - Develope env. but not in the stage Env and Producation Env.
Can you help me for this?
|
|
|
|
|
Hi,
Recently I found that, the same Windows and ASP.NET applications were working fine for MS Agent Characters to make them Speak. But last few days none of them are talking. They are functioning well for the other activities but not talking?
I mean, Character.Speak("Hello World") is not making them speak at all.
EVEN IN MICROSOFT WEBSITE PAGE, at http://www.microsoft.com/Msagent/dev/code/TryMSAgent.asp[^]
The PEDDY is not talking in my computer. In that way I am sure that, My programming has no problem, Something we need to upgrade in our PC to make them talk. What is that upgrade ?
If so, How to recover this problem..!!
Thanks and regards
-- modified at 17:30 Saturday 12th August, 2006
|
|
|
|
|
emran834 wrote: that
Open volume cntrol. Uncheck "mute"
|
|
|
|
|
Hi
thanks for your reply.
My Mute was unchecked as I was listening all other sounds. o u have any other idea about the reason ? because I checked multiple computer and I found none of the computer is sounding MS Agent Speech.
Thanks
|
|
|
|
|
I have a panel with tons of controls displayed vertically. ( about 3 x the length of the panel )
When I scroll to the bottom it works fine.
But, when I scroll up it resets back to the oringal position.
For instance, I scroll all the way to the bottom.
I then click in the middle of the scroll bar so it goes up a page. But it doesn't move.
But, then I notice if I click in the panel and then click on the scroll bar. It moves.
Any ideas on a work around?
-- modified at 15:35 Sunday 13th August, 2006
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
How can I add an HTML file as a resource to a binary, and how to reference it from my code?
(VS2005)
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|