|
Really? I don't find it hard at all, and Windows does a lot of things for you. You don't have to care about windows being partly hidden, getting uncovered, minimized, etc. It will repaint for you, assuming you did it right to start with.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Hey Luc,
Is there any Graphics Library available for .Net which does more than what GDI+ does? I mean something that takes care of some advanced functions like layering?
I have an interest in printing multiple png images with transparency, being able to drag and drop them. Also, having multiple layers like in Adobe Photoshop?
Ofcourse I mean open source/free.
Som
|
|
|
|
|
I'm not experienced with any additional library, I tend to write the code I use myself. Mostly from reading forums like this one, I must warn you transparancy is a bit tricky in Windows.
You may want to look to some of the graphics articles at CodeProject; and then there is GIMP which could inspire you.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
GIMP is what drove me to try drawing in Windows.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
You might be able to do something with the Netron library available here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I tried a little of that a while back, and found it not to be as straight-forward as I had hoped. I only needed to draw some lines and I got it working.
|
|
|
|
|
Then don't stop; the first line is the hardest
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
naah.. the hardest part is to fight flickering
when anything u do in windows doesn't work 
|
|
|
|
|
The hardest part was keeping them where I want them as the underlying control scrolls, horizontally and vertically. 
|
|
|
|
|
Just don't go one toke over the line.
|
|
|
|
|
I'm stuck on a previous problem that I posted a week or so ago (Please let me know if it is considered rude to post a new thread in this case)
I have a dataGridView that is bound to table1 in dataset1. I have changed the column type for column1 to a comboBox and have populated the collection with instances. Let's say 1, 2, and 3.
column2 is also a comboBox, but its instances need to be driven by column1. For '1' in column1, column2 would allow 11,12,13 and for '2' in column1, column2 would allow 21,22,23.
One suggestion was to create another dataTable in dataset1, and bind column2 to the new datatable using another bindingSource and then filter.
I went ahead and created another dataTable and edited the second column in the dataGridView to have the DataSource as bindingSource2 and the DisplayMember as column1 (the first column in dataTable2) (while this may not make sense at first glance, my objective was to manually populate data in dataTable2, column1 and then make sure the comboBox in column2 in dataTable1 would populate with dataTable2 values). But, this did not work.
Would it be easier here to create (3) ILists (IList1, IList2, IList3) each of which contain i1, i2, i3 for each list and then populate the comboBox in column2 of dataTable1 based upon the selection made in column1?
Do I need to look at the second dataTable option a bit more closely?
Thanks.
|
|
|
|
|
Firstly it most definitely NOT rude to repost after such an interval.
Secondly a question. Will your DataGridView only have one row or will it have, possibly, many rows where the user can perform this operation differently on each row? e.g. user selects 2 on row1 combo1 and selects 1 on row2 combo1 and so on.
If it is one row then perhaps a DataGridView is not the right option.
If it is more than one row then take a look at the links provided in DataGridView FAQ[^]. A possible solution is in Appendix A item 18 of the first one. There may also be a sample in the second link, I haven't got round to examining that yet.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks Henry.
Henry Minute wrote: Secondly a question. Will your DataGridView only have one row or will it have, possibly, many rows where the user can perform this operation differently on each row? e.g. user selects 2 on row1 combo1 and selects 1 on row2 combo1 and so on.
It will have many rows where the user can add additional devices. For example, they will have a device with a S/N 123. That device can connect to another device with S/N 234 (so now there are two columns). My challenge is to have a third and fourth column which is what this thread is about. There will be a collection in column 4 from which they can select. This will be read only. Going back to the original post, if they select '1' in column 3, they can only select '11', '12', or '13' in column 4. Again, read only. There can be several rows in the dataGridView.
Appendix A, 18 indicates pulling data from two tables. In this case, I am writing the data to a .xml file as there won't be a large amount of data. Therefore, there is only one table to speak of. Since column 4 is read only, it doesn't seem to make sense to have another .xml file for a table that just has a limited and fixed amount of data. I'm a novice, but I want to lean towards an IList, but I'm a novice.
I'm still going over this document (thanks a lot by the way, it's great for coming up to speed more quickly on dataGridView), but wanted to respond in case I was headed on a wild goose chase.
Thanks, Mike
|
|
|
|
|
Just a couple of things for you to think about while you are testing/experimenting.
Although the example in Appendix A uses two tables, there is no reason that you cannot have two BindingSource components pointing at the same DataSource .
BindingSource has a List property which is an IList . Basically BindingSource is a wrapper round an IList to enable things like Sorting, Filtering, Navigating (Next, Previous, First etc.) and lots lots more. It is certainly possible to use an IList directly but you will often find that you end up having to code functionality that is already built in to BindingSource .
Anyway good luck and please come back if you need help. I may not be able to, but I'll have a go.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks Henry.
I'll be getting back to this in the next day and will let you know how it goes.
Mike
|
|
|
|
|
http://i.msdn.microsoft.com/dynimg/IC295013.png[^]
i dont know if this is the right place to ask this but i just want to know if the small popup window on picture above is custom window or if there is an api or something so we can use windows with that kind of border?
|
|
|
|
|
That is what you get with FormBorderStyle.Sizable or FormBorderStyle.SizableToolWindow , provided the title bar isn't shown; this requires ControlBox, MaximizeBox, MinimizeBox to be false, and Text to be an empty string.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
I created a little article[^] and test app showing the different possibilities. Wish MSDN would show actual images of form border styles!
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
All controls are created and added in the designer.cs file for your form by default. You can look there and see where to write the code for the various aspects but be careful - you shouldn't really edit that file by hand. You should use this where you have written myForm above.
Using the designer's drag and drop facilities is a lot quicker and easier IMO.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Currently I have a grid that fills rows a certain color when a certain condition is met (its a Grid from Divelements but similiar to MS)
I have tried Divelements forum but Im looking to see what you guys would suggest as the sandgrid has similiar functions as the standard Grid
protected override void DrawRowBackground(Divelements.SandGrid.Rendering.RenderingContext context)
MasterListItem M = this.DataItem as MasterListItem;
if (M.Flags == 1)
{
context.Graphics.FillRectangle(Brushes.LightYellow, this.Bounds);
}
base.DrawRowBackground(context);
How do I specify this to only drawRowBackground on 1 specified column instead of the whole row of columns.?
any example code?
|
|
|
|
|
I have a html editor which replaces all the \r\n with <br /> . Now the problem is that it replaces every line with <br /> which make sense, But I do not want it to replace with some tags like ul, ol, li, br, hr. I'm sure I can do that with regex but you know its sort of like learning a new language. I tried many times but I'm not pro yet. In this case I have no idea where to start. So can anyone help ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
|
Well, I'm not trying to parse but replace the \r\n in specific places.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
That's how it starts...
Detecting the parts you don't want to affect will require parsing won't it?
|
|
|
|