|
Hi friends,
How we can create a tearable-tab in C#? Means, suppose we have 2 tabs in a window/dialog. The user can be able to detach a tab from its parent window/dlg.This kind of tab implementation is called tearable-tab(I heard some term like "tab to window extension").
Hope some one can help me.Thanks in advance.
Thanks buddies
|
|
|
|
|
cooltuxxx wrote: How we can create a tearable-tab in C#?
Do you mean besides developing it?
|
|
|
|
|
Hi Friend,
I'm new to C#. Can any one give me the code that implement tearable-tab?
Thanks in adavance.
|
|
|
|
|
cooltuxxx wrote: Can any one give me the code that implement tearable-tab?
First, read the post at the top of the forum titled "how to get an answer to your question", pay attention to item #2.
Second, what about the information Patrick Sears gave you? That should provide a solution for you.
|
|
|
|
|
Hi Mike,
Sorry.
Actually I want to construct 2 tabs in a form.These tabs will contain other GUI controls. Also the user should be able to tear off the tab from its parent window to make it a stand alone window. If the user double clicked on the title bar of this window it shoud again comes to the tabbed state.
Hope you got the points. ...I have very less experience in GUI design.
Thanks
|
|
|
|
|
cooltuxxx wrote: Hope you got the points.
Not really. There might not be a tool that will give you this behavior by dragging it from the toolbar and dropping it onto your form. If not you will have to develop a solution, perhaps using a library like Patrick linked to that gives you a partial solution.
cooltuxxx wrote: Hope some one can help me.
Help you with what? How?
|
|
|
|
|
Ok Mike.Thanks
|
|
|
|
|
Take a look at the DockPanelSuite [^]by Weifen Luo. I've used it to create a couple of tearable-tabbed applications.
There are even articles here on CP that show you how to extend the styles and functionality of the library.
"If you think of yourselves as helpless and ineffectual, it is certain that you will create a despotic government to be your master. The wise despot, therefore, maintains among his subjects a popular sense that they are helpless and ineffectual."
- Frank Herbert
|
|
|
|
|
Patrick Sears wrote: tearable terrible-tabbed applications.
Tabs have been so abused in GUI design that I just have to laugh at the idea of a GUI that is spoken of in terms of "Tabs".
|
|
|
|
|
Thanks Patrick. But i need to implement in VC 2005 itself. I will do it anyway...Thanks alot.
|
|
|
|
|
how to create progress bar in C#
thanks
Haloha...!!!!
|
|
|
|
|
You can drag and drop one from the toolbox???
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
but i don't understand with the source code to create progress bar
Haloha...!!!!
|
|
|
|
|
You want to create a custom progress bar? Or just use the one thats already provided?
Either way, the webiste is packed full of tutorials, just type 'progress bar' into the search box up there ^
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
|
How do i align my form to the bottom left of my screen?
|
|
|
|
|
In the Properties screen of your form, set the startup position of your form to manual. Then change the location to where you want the form.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Do you want the form to show up in the bottom left corner of your screen,
and remain there (unmoveable)?
Edit: If this is the case, then you could do it by adding these lines of code in your form's constructor:
this.StartPosition = FormStartPosition.Manual;
this.Location = new Point(0, SystemInformation.WorkingArea.Height - this.Height);
Note: This doesn't make the form unmoveable. I'm still looking for a way to do that. Perhaps you could set a timer that moves the form back to the same location at a given interval - but that's a ugly way to do it, honestly.
Edit #3 : Here a way to make the form "unmoveable", that is, it's still moveable, but as soon as the user releases the mouse button, the form "jumps" back to it's default position.
Set the form's Move event handler, and write the following code:
this.Location = new Point(0, SystemInformation.WorkingArea.Height - this.Height);
And that works!
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
Thanks. I thought there might be a propery to do the work for me. Guess not (getting lazy with 2.0)Framework)
|
|
|
|
|
Yeah, I was hoping that there was a property to do that, but it seems there isn't.
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
hy everyone!
i want to parse a file which contains a lot of info, some info is not necessary for my application but some is. so i have to look for this kind of information by parsing the file and extract it. i found a solution for my problem but i am not very happy with it.
my lines start either with f or d where f is for format and d is for data. the f line describes where which info could be found in the d line which follows. e.g.
fname,address,postalcode,city,phone,fax
dsmith|new street 11|1234|new town|123456|234567
now i want to extract lets say the phone number. lets say i do have 20 lines like above which should be parsed one by one. my problem ist i can't just search for phone, because first i will get more than one hit and second i have to know the index, meaning where it is located in the f-line to find the data in the d-line. i do only want to extract the data which can be found in the d-lines, the f-lines are only there to get the index where the data is stored in the line. (it's always a f-line - d-line combination in the whole file. so some kind of valuestrings).
i could read line by line out of the file and check if a token is in it. if it is not then the line is of no interest, if there is then i have to tokenize it. but what if i want to extract more than one info? lets say i want to extract phone than it is quit simple, but what if token1 is in it and token2 isn't (for what reason ever) and it is the token i used to search for? normally every line should look the same so i could just use one which is in there for sure.
example
fone,two,three,four
d1,2,3,4
ftwo,three,four,five
d2,3,4,5
fname,address,postalcode,city,phone,fax
dsmith|new street 11|1234|new town|123456|234567
fname,address,postalcode,city,phone,fax
dsmith1|new street 121|12324|new town|1232456|2234567
fname,address,postalcode,city,fax <=
dsmith2|new street 131|12334|new town|2334567 <=
ffoo,foo2,foo3,foo4
d1,2,3,4
ffoo2,foo3,foo4,foo5
d2,3,4,5
so with my current solution i would search for a line with phone in it, then split the info by tokenizing it and extract the data. but if the entry is no longer in it (see line with <=) i am lost and have to change the algorithm. does someone of you have a better solution how to find the line or even to realize it is a line which is worth tokenizing (because lines with data of no interest should be left behind because of performance reasons!).
i hope i was able to describe my problem well enough so you could get the gist of what my current problem looks like.
thanks.
stephan.
-- modified at 10:53 Wednesday 24th October, 2007
|
|
|
|
|
|
Hi,
I'm sure this has been discussed before, but I can't seem to put my finger on any article useful to my problem.
What I'm trying here is to use Generics through a method with this signature:
public T Read<t>(string section, string key, T defaultValue)
There is a value associated with the specified section-key. I'd like to be able to convert the said value as either a bool, an int, a float or a string.
My problem is that I can't enforce a constraint on the generic T to be of those common data types. Boolean, for example, is a struct, and the constraint must be an Object.
Is there something I'm missing, or must I use some workarounds to this issue (no generics, wrapping data types, ...)?
Thanks!
|
|
|
|
|
If you have a set list of say four items, then you don't need to use generics. You can simply build overloads of the Read method that takes each type, for example:
public bool Read(string section, string key, bool defaultValue) {
}
public int Read(string section, string key, int defaultValue) {
}
etc...
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
I just want realize the following:
I plot two lines in a panel, and now I want to use mousemove to select the two lines. Just like most software, a dashed rectagle is displayed during mouse moving. If the lines are within this rectagle, then the lines are selected.
Now I have one problem, during mouse moving, the panel is required to refresh and update continuously, then the lines are also update again and again during mouse moving, then it gives flash effect. How to avoid to update the lines during mouse moving?
thanks !
|
|
|
|
|