|
In the original post:
Glen Harvy wrote: Whenever I select an item in the checkedlistbox, that control holds focus, meaning I can't navigate to any of the other controls EXCEPT those in the bindingNavigatorControl
I think I didn't get you right!! Did you mean that the CheckedListBox has the tab focus captured -ie. when you press tab you move to the next item in the CheckedListBox instead of focusing on the next control-, or did you mean that you have to submit -save- the data before changing the focus?!!
What exactly do you mean by navigate? and how many controls are DataBound -if any- beside the CheckedListbox? Workarounds are always there, but your problem is what exactly?
Regards
|
|
|
|
|
Thanks for your response ..
There are 4 controls on the page. One is a textbox, two are drop down comboboxes and one is the checkedlistbox.
I can edit the textbox then move (tab or mouse) to either of the comboboxes and make selections without problems. I can freely move between any of those controls as well as the save, exit etc buttons in the navigator/menu strip.
When I check or uncheck one item (or items - I can change as many as I like) in the checkedlistbox I can no longer select any other control listed above EXCEPT the navigator controls.
The checkedlistbox is bound to a separate datatable than all the other controls on the page - any changes are processed separtely to the naviagtor bound items.
Everything works fine (ie I can edit and save the changes) except I must leave the checkedlistbox selection changes to the last or I won't be able to change anything else.
It's got me stumped!
Glen Harvy
|
|
|
|
|
That's weird!! Never occured to me before!!
Glen Harvy wrote: When I check or uncheck one item (or items - I can change as many as I like) in the checkedlistbox I can no longer select any other control listed above EXCEPT the navigator controls.
What happens when you try to click inside the textbox? Nothing at all? What about doubleclick in the textbox ar any other control? What happens after you click save in the navigator? Everything back to normal I guess?
One workaround is to automatically call a save when the use checks/unchecks anything. This will submit the transaction and may realse whatever capture is there. If this doesn't work, or is inconvenient, I'll be waiting for an answer to my above three questions.
Regards
|
|
|
|
|
Nader Elshehabi wrote: What happens when you try to click inside the textbox? Nothing at all? What about doubleclick in the textbox ar any other control?
You cannot select/click/double click any other control besides the bindingnavigator controls once you have clicked once in the checkedlistbox.
Nader Elshehabi wrote: What happens after you click save in the navigator? Everything back to normal I guess?
Yes.
I guess your workaround would work but it is conceivable that there would be quite a few saves involved.
I've already tried to transfer the focus to another control everytime a checkbox is clicked BUT that doesn't work either.
I don't have enough experience to properly work this out but I hate it when something likes this happens ie no one else seems to have the problem. I'm trying to re-think the construction of the form itself because it strikes me that the problem lies therein.
Any other ideas?
Glen Harvy
|
|
|
|
|
Last thing I got in my sleeves is what I told you. First Save the data automatically -Sorry!! No rollbacks here!-, then use one of the folowing methods to change the focus:
MyListBox.SelectNextControl();
TextBox.Focus();
TextBox.Select();
this.Capture = true;
Well, I hope something of the above works. If I figue out something else I'll make sure to post.
Regards
|
|
|
|
|
I've tried everything without avail.
After a lot of research on the net, the problem I am having would appear to be a derivative of the known bug with the checkedlistbox control that occurs when the control loses focus on a tabed page. Whilst I am not losing "state", all the other symptoms are present viz a Tabed Page, visible being toggled etc.
I'v re-written the whole tab and now have the checkedlistbox come up in another window by itself.
Thanks for your input - it has been appreciated - I'm not alone
Glen Harvy
|
|
|
|
|
I'm writing an app in C# with Windows Forms, and one of the things I want to do is have smaller "tool window" forms in addition to the application's main form. These tool windows need to appear above the main form at all times, even when they are inactive. I can't seem to find a way to do this except by using the TopMost property, but that just produces a form that shows above everything, not just my application's main form. This is not what I want - the tools should appear above the main form, but under any other active windows.
Making the tool form a child of the main form doesn't seem to help either; it's not allowed to be a top-level form in this case, and it can no longer move outside of the main form's borders.
I'm sure there's a pretty easy way to do this that I'm missing, but even a bit of searching on MSDN and Google have turned up nothing useful. Any help would be appreciated.
|
|
|
|
|
Woops, never mind! The answer was staring me in the face the whole time:
Form.Show(IWin32Window owner)
is the overload that does the trick. Carry on, nothing to see here.
[Insert witty and relevant signature here]
|
|
|
|
|
Hi guys, I ve created a Win app that allows me to add picture to my database using the following code
System.IO.FileStream stream = new System.IO.FileStream(FileDir.Text, System.IO.FileMode.Open, System.IO.FileAccess.Read);<br />
byte[] buffer = new byte[stream.Length];<br />
stream.Read(buffer, 0, (int)stream.Length);<br />
stream.Close();<br />
InsertImage(ref buffer);<br />
buffer = null;
The Function InsertImgage stores the picture in my database, this part is easy I'm wondering how I can store a picture with specific size, for example 500*600 ?!?!
Thanx in Advance
|
|
|
|
|
Hello
You can scale you image using a Graphics object:
Graphics g = Graphics.FromImage(MyImage);
g.ScaleTransform(XFactor, YFactor);
You can determine X, and Y factors by the ratio between the current size and the size you want to scale to.
Regards
|
|
|
|
|
Hi everyone.
I have a problem made me depressed!
When I'd been using VS.net 2003 I used to put an image in PNG format with some parts transparent as my form's backgroung image and that way I could make the whole form follow the png transparency even if the png was 50% transparent, the form could became a 50% transparent form showing the objects below the form, but as long as I started using VS 2005 the form shows the png image on the background color of the form and also I can not set the background color to transparent and even if I use the transparency key of the form, it just damages the appearance of my form!
Any idea what to do?
Sojaner
|
|
|
|
|
Hello
I don't know much about VS2003, but your solution is GDI+. In this article[^] take a look at the PerPixel example. It does exactly what you are looking for.
Regards
|
|
|
|
|
Thanx a milion!
It really workes.
But I'm really gonna'miss that ability!(It was faster and easier)
Anyway, thanx again. ;P
Sojaner
|
|
|
|
|
Hi guys. ...I'm working on a program to hone my skills a little bit cuz I've been out of the game for a while. So, I've got an MDI child form and the parent has a panel on the left side that contains my GUI controls. Whenever my child opens, I don't want it to be able to be moved behind the parent's GUI control panel. Two logical solutions I've come to would be to make the child forms immovable but I don't wanna have the screen flicker while the forms move method is resetting the location of the form to the default location. I know that I could call a paint to a backbuffer and do a swap to remove the flicker, but I was hoping that someone knew of a simpler solution. Is there any way to disable the child form titlebar's selection property? [edit: I want the form to have a border, so setting the BorderStyle to None does not solve my problem] ...Better than that, would be my second option. Ideally, I would like to be able to move the child form around in the parent form's available workspace but not allow it to move behind the control panel. The only solution to this that I can think of would be to compare the top-left's Location.X component to the width of my control panel, but everything I've tried hasn't worked. Anyone have a solution to either of these options? Or at least can someone point me in the right direction? ...I'm asking for help on this because it's trivial to my application, but I'd like to make my interface look as nice as possible.
-- modified at 0:10 Tuesday 12th September, 2006
|
|
|
|
|
Hello
Well, I didn't want to reply hoping that someone would grap a better idea!! One lousy way of doing it is capturing the mouse by the parent form to prevent the user from further movement:
if(MDIChild.Location.x < MinX)
{
MDIChild.Location = new Point(MinX, MDIChild.Location.y);
this.Capture = true;
}
else if(MDIChild.Location.y < MinY)
{
MDIChild.Location = new Point(MinX, MDIChild.Location.y);
this.Capture = true;
}
You can put the above code in the parent -if you keep a track of the child forms-, or in the child. The idea is to check the current position, and resetting it if necessary, then capturing the mouse from the child form to stop further moving.
One stupid drawback is that you have to click somewhere before the mouse returns to normal -ie. release the capture-. I didn't figure out a workaround, but I'm sure you can make it.
Regards
|
|
|
|
|
I tried something similar to that when I first approached the issue, but VS kept telling me that I couldn't perform the comparison "form.Location.X< minX" because Location.X was not a variable. I looked at the documentation for the member functions and I could not for the life of me find any combination of anything that would allow me to actually pull the X and Y components out of the location to perform a comparison.
|
|
|
|
|
That's weird!! This error appears when you try to change the X or Y values not read them!! Try again to compare them without changing. If you want to change the location use the new Point(X,Y) statement.
Also I don't have top remind you that you access them by instance not by class. They are not static members.. If nothing is working -for some reason or the other-, use the Form.Left and Form.Top properties instead.
Regards
|
|
|
|
|
I've decided a course of action since my original posting of this afternoon. What I have done is gone into Photoshop and created my own form bitmap mask. I placed a simple(not really, it's rather complex ) border on the edge of the image so now I can set it to my background image and then set my formBorderStyle to None while still having a border. But, if I'm gonna go to all that trouble for a stupid border, I'm gonna go a little bit over the top, which I did. I cut out a shape for my form so that the upper left is at the standard border position (so I can put buttons for my form controls) but about a third the way from the left, I drop the edge down and run it to the far right side with a rounded corner.
(Now to my new issue) ...I've never tried this, so I'm kinda stuck and I can't find any info on it. My main form is an MDI parent, and the custom-shaped form with the transparency mask is a child. The transparency works, but instead of dropping the transparency to the background of the parent form, it performs full transparency and ends up falling through to my desktop background. Has anyone ever tried doing this and come up with a solution to this issue? ...Sometimes I really, really hate Windows : P (*Rumbling* ...I didn't mean it, I didn't mean it!!)
|
|
|
|
|
Are you that desperate? check the Form.Left property as I told you in my previous post!!
Regards
|
|
|
|
|
can someone send me a backtracking program solving sudoku puzzle
|
|
|
|
|
I'm sure there are many people here willing to do that for their normal hourly fee.
Oh wait, you wanted to get something for free without doing any work?
|
|
|
|
|
Hello
Did you seach the articles[^] first?
[edit]
First, welcome to CP. I know you are new here, but there are simple rules you must follow before posting in the forums. If you want to learn about a topic in general -as the case now- you should search the articles for samples and walkthroughs. The link I provided to you above should give you a good start. If you have a specific question about something you stuck in, you can post it in the appropriate forum.
May I suggest that you revise Chris' Posting Guidlines[^]. It should give you a good idea on how to post.
Regards
|
|
|
|
|
Dear jonathan
would you, could you, send me a backtracking student who does not post his assignments to the cpians?! I wish you could, you munkey turd, because every time i get student he posts assignments on cpians like a little cheatingers. now i will go sing an hindu lamentation over your failures as a human being.
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
|
|
|
|
|
make no doubt u must no, post homework assignments to cpian projectiles.
|
|
|
|
|
I have an XSD with a datatable called typedTable. There are 6 fields in that table.
First, Last, Address1, City, State, Zip.
I have datatable with a single record. Same column names in the table, except there is no value for the City, State, Zip.
First, Last, Address1, City, State, Zip.
I am trying to cast the [on the fly datatable] to the typedTable. I get the object ref error.. I have used the DataTable's writexml method and it wrote only the first 3 columns being there are no values in the last three.
Please advise,
Thanks in advance...
Shrini Viswanathan
|
|
|
|