|
string newStr = oldStr.Replace ("\\", "\\\\");
/ravi
|
|
|
|
|
This may be a dumb question (total .NET newbie here), but how do I allow the user to edit an item in a checkedListBox control?
With a treeView control I call treeView.SelectedNode.BeginEdit() but I can't see an equivalent method for checkListBoxes. Am I missing something really obvious? Thanks!
music: www.bradsucks.net
|
|
|
|
|
As far as I know, it is not possible. You would need to implement that functionality yourself. You could try creating a textbox and positioning it over the item you want to edit. I've seen it done before, just not in C#.
|
|
|
|
|
Hello
The .NET ListView control has a useful function (actually two) BeginUpdate and EndUpdate.
These functions allow you to stop repainting of the ListView before you edit the items in the list and then resume repainting. This prevents flickering when a lot of items are added.
I'm wondering if there is a (easy) way to do this with other controls.
In my case that would be a FlowLayoutPanel, and i'm trying to prevent it from repainting while i edit the size of a few controls inside of it.
Is there a way to do this, without creating a UserControl from scratch?
Thank you.
|
|
|
|
|
Yep! Take a look at SuspendLayout and ResumeLayout . I think they're what you are looking for.
[EDIT: Actually they are Control members, so they work for every Control -derived class]
|
|
|
|
|
Thank you very much, i will try it ASAP!
|
|
|
|
|
Hi,
Is it possible to link a javascript file to a WebBrowser control's document? For example, if I have a library, whose main js driver file is called myLib.js, is it possible to link to the library from a document loaded in the WebBrowser control?
I have tried something like:
<br />
webBrowser.DocumentText = "<html><head>" +<br />
"<script language=\"JavaScript\" src=\"myLib.js\"></script>" +<br />
"</head><body>" +<br />
"<button onclick=\"testFunc('running test func')\">Call test func</button>" +<br />
"</body></html>";<br />
where testFunc(...) is a function in my javascript library, but it does not work.
Thanks in advance,
-----------------
Picazo
|
|
|
|
|
I have a app connecting to sqlserver using the ntlogin.
I want to verify if the NT user has access to read/read-write to the database/catalog.
This is in a corporate environement, so the sqlserver access must be setup via an Active Directory GPOs.
Anybody know how to do this?
Luke
|
|
|
|
|
What about just trying to do it? If you get an exception (either on opening the connection, doing the update), then you know you can't do it.
|
|
|
|
|
I was thinking of that, but i want to allow/disallow certain functions if the user has read vs. read/write access. I will disable all buttons except the search button if the user has read only rights.
|
|
|
|
|
I am not too sure about this, but depending on the user permissions I think SELECTs can work and UPDATEs can fail.
1. Try to connect to the database. If successful, user can login
2. Try to read a record (with SELECT). If successful, user has read access
3. Try to insert or update a record. If successful, user has write access
If only the third test fails, the user has read-only access.
|
|
|
|
|
Unfortunately i can't push an insert or update to production databases in order to determine if the user has write access, so that brings me back to needing to query some sort of users table in sql plus. Do you know where that might be?
|
|
|
|
|
Hi everyone,
The original idea of the new library(MRCopy) that I want to create is to offer the possibility of saving state of the client application. How do it? Using the memento pattern and reflection and serialization...
It’s a simple idea that need to be worked but I think that it goes forward is something helpfully for any Windows or web application.
Any help or suggestion will be welcome.
Thanks in advance
|
|
|
|
|
if any one have in his mind ideas for Project Graduauion in IT engineering fuculty please dend me it and I will be very thankfull for him
my e-mail
michaelqog_71@hotmail.com
|
|
|
|
|
michaelqog wrote: if any one have in his mind ideas for Project Graduauion in IT engineering fuculty please dend me it and I will be very thankfull for him
my e-mail
michaelqog_71@hotmail.co
Spell Checker?
|
|
|
|
|
Or a screen scraper that grabs email addresses of bulletin boards and spams them?
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
dino2094 wrote: Spell Checker?
I'd hate to see the dictionary they build for it.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Hi Fellow;
I have certain ideas for graduating project.
1-Develope a lazer based securit system for a safe room...Laser ligts are spread inside the room,whenever some one tries to enter into the room the sensor senses the persons...that some one has entered into the room.
2-develop a mobile based software that can detect the location of the calling persons.
3- Develop the steganographic application that hides secret messages into images,audio or video..etc.
For further detail .contact me: rao282002@yahoo.com
I am getting B.S. degree in Computer Science.And want to enhance career in Software development.
|
|
|
|
|
Ask your professors for some insight. That is what they are there for.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I store an object to the clipboard like this
Clipboard.SetDataObject(CustomDataObject)
and retrieve it like this:
<br />
if (Clipboard.ContainsData("MyNameSpace.CustomDataObject"))<br />
{<br />
CustomDataObject objectName = (CustomDataObject)Clipboard.GetData("MyNameSpace.CustomDataObject");<br />
}<br />
The problem is that if (Clipboard.ContainsData("MyNameSpace.CustomDataObject")) evaluates true but when CustomDataObject objectName = (CustomDataObject)Clipboard.GetData("MyNameSpace.CustomDataObject"); is carried out objectName is assigned null. I read through the documentation on the Clipboard.GetData method and it says it only returns null if the specified format isn't on the clipboard. But it clearly said that format WAS on the clipboard, that's contradictory!
Oh and no error is given so Clipboard.GetData is working properly I suppose but returning null nonetheless.
|
|
|
|
|
1. I've created a userControl that contains a Label and a TextBox.
2. I programmatically create a number of TabPages and add them to a TabControl.
3. On each TabPage I programmatically add a number of my userControls giving each control a unique name
and I pass information to the control to adjust the label.
This is all based off of an xml file. So I read this xml file and determine how many tabs and how many controls I need to
add to each page. The user will then edit the data in the textbox if needed.
Once the user is done and click save, I need to go through each control and get the value that the user entered. Then update my xml file with the new data.
I can not figure out how to loop through and get the controls off of each tab.
Hopefully I've explained this clearly.
Thanks in advance for any help!!!
Bob
|
|
|
|
|
foreach(TabPage tp in tabcontrol1.TabPages)
{
foreach(Control ct in tp.Controls)
{
if(ct.GetType() == typeof(TextBox))
{
}
}
}
This would be ok for the textboxes inside the tabpage, if you have a groupbox or panel, you will have to add one more loop to find the controls inside them.
Is it not possible for you to directly access the text box? You are creating the textbox control from the xml list and you should have the textbox Name?
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
Good point, you interate through your XML file to build the controls, so you should be able to go through it again to know where to get values back out.
|
|
|
|
|
Personally I would modify the test to be
if ( ct is Textbox ) ...
and others on here would use
TextBox temp ;
...
if ( ( temp = ct as TextBox ) != null ) ...
any of the three should serve you well.
|
|
|
|
|
I have used if ( ct is Textbox ) kind of code also, but I really haven't researched the difference of this vs that. Does it improve performance or is it just a better way of coding it?
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|