Search found 149 matches

by jmason1182
Wed Jan 30, 2008 1:47 pm
Forum: C++ Development
Topic: [printing] wrong page size calculation in printing-sample?
Replies: 24
Views: 3487

Some quick things I noticed is what I had a problem with before. First off, IF you have multiple pages, you probably want to be able to compute how many pages you need. Since you are scaling before you draw, you'll have to apply the scale before computing page numbers too. Here's how I did it: (My c...
by jmason1182
Wed Jan 30, 2008 1:18 pm
Forum: C++ Development
Topic: [printing] wrong page size calculation in printing-sample?
Replies: 24
Views: 3487

Actually, what you have should work for scaling. Later on today i'll post a few comments. I have to make time to go through your code a little more.

In the meantime, what parts of the code are most confusing?
by jmason1182
Tue Jan 29, 2008 10:26 pm
Forum: C++ Development
Topic: [printing] wrong page size calculation in printing-sample?
Replies: 24
Views: 3487

I had a lot of trouble with the same issue you are dealing with. "To Be or not to BE" in pixels.... or cm... or POINTS... etc. etc. See, you have to pick one, then scale AFTER you do all drawing. if you don't then you will have a difficult time doing your scaling everywhere. I learned this the hard ...
by jmason1182
Tue Jan 29, 2008 4:23 pm
Forum: C++ Development
Topic: Can't get add rows to work
Replies: 2
Views: 753

That was it. I couldn't find how to send a message to the grid saying "Hey! I added a row!" EDIT: This partially works. However, I had to do the following: wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, numRows, numRows ); GetView()->ProcessTableMessage( msg ); Notice that numRows is...
by jmason1182
Tue Jan 29, 2008 3:56 am
Forum: C++ Development
Topic: Can't get add rows to work
Replies: 2
Views: 753

Can't get add rows to work

I have a custom wxGrid that I'm using to display inventory item information. It has checkboxes, drop-down lists, etc. I do this through a custom wxGridTableBase. I checked the examples, but only the simple table has an add row (wxGrid::InsertRows) but the custom grids don't illustrate how to overrid...
by jmason1182
Fri Jan 25, 2008 2:49 pm
Forum: C++ Development
Topic: Need a wxGridCellChoiceEditor in an individual cell
Replies: 5
Views: 1186

I was way off! Ok, so first off, there already exists a perfect manner to do this, without overwriting any other classes than I've already done. I just didn't see how the example was doing it. So, first, the example uses the "platform" column as a GRID_VALUE_CHOICE type. BUT the platform value is ju...
by jmason1182
Fri Jan 25, 2008 1:20 pm
Forum: C++ Development
Topic: Need a wxGridCellChoiceEditor in an individual cell
Replies: 5
Views: 1186

I tried changing my tactics a little: Now when I create the grid I assign a blank wxGridCellChoiceEditor() to the Units column. That way my editor is always there. I just need to get the parameters to reflect whatever row you are looking at. wxGridCellAttr *MyGridCellAttrProvider::GetAttr(int row, i...
by jmason1182
Fri Jan 25, 2008 12:55 pm
Forum: C++ Development
Topic: Need a wxGridCellChoiceEditor in an individual cell
Replies: 5
Views: 1186

Kind of.... the problem with doing that (and thanks by the way, I didn't know I could set an individual cell that way) is that I don't know what the choices are until any new row is added. An example. As I said before I'm working on an inventory program. Each row will represent an item in our stock ...
by jmason1182
Thu Jan 24, 2008 10:16 pm
Forum: C++ Development
Topic: Need a wxGridCellChoiceEditor in an individual cell
Replies: 5
Views: 1186

Need a wxGridCellChoiceEditor in an individual cell

I am putting together a grid that will handle items from our inventory. Each item has different units, so I can't just give a static list of units and have the unit column be a wxGridCellChoiceEditor with a single list... Using the example, I defined a custom grid and I overwrote the wxGridCellAttrP...
by jmason1182
Thu Jan 17, 2008 3:44 pm
Forum: C++ Development
Topic: Printing DC inconsistent. No transparency, no blitting.
Replies: 4
Views: 1896

I have wasted about two weeks on this... I thought I was trying something wrong with the bitmap part.... but you summed it up. ... It's a one way train. ... Thank you for your explanation most of all! I hope this being on the forum will allow for others to find it as well. Since I haven't found a so...
by jmason1182
Thu Jan 17, 2008 4:50 am
Forum: C++ Development
Topic: Printing DC inconsistent. No transparency, no blitting.
Replies: 4
Views: 1896

Printing DC inconsistent. No transparency, no blitting.

Here's a function I am using to put a bitmap image onto a print-preview window as well as printing it out. (this is needed because printing doesn't handle transparency in images.) bool DrawBitmapElement(wxDC &dc, wxBitmap element, int XOffset, int YOffset) { int imgW = element.GetWidth(); int imgH =...
by jmason1182
Fri Jan 11, 2008 5:33 pm
Forum: C++ Development
Topic: Printing Masked Images
Replies: 3
Views: 1762

EDIT: To see my real solution, follow this thread.... http://forums.wxwidgets.org/viewtopic.php?p=75892#75892 Below, I have a function that worked... ONCE. So I opened up a new thread that continues from where it stopped working. I'm leaving my original code plus this explanation: IT DOESN'T WORK b...
by jmason1182
Fri Jan 11, 2008 3:33 pm
Forum: C++ Development
Topic: Printing Masked Images
Replies: 3
Views: 1762

I've got the EXACT same problem with the 2.8.7 widgets....


I'll post back what I figure out... it will probably be what you did with the MemoryDC to "Apply" the transparency over a blit of the printer DC

Hope this works....
John
by jmason1182
Fri Jan 11, 2008 1:30 pm
Forum: C++ Development
Topic: Print Preview Display Problem
Replies: 2
Views: 832

What changes did you make (You said you have since removed some useless things at the bottom). I've got a really complex printout object. I pass it a whole BUNCH of "elements" that contain placement, images, text, data fields, etc. etc. and it places them on the DC.... it works great for everything....