Hi everybody,
I am developing a little graph editor using python 2.5 and wx 2.8. Whenever I try to add text to a line shape I get a big rectangle on the background which covers the shapes. Is there a way to render the text on a transparent background? I googled and found the same question in several places, but no answers :)
The second thing is: If I am drawing a lineshape as an spline, control points are fixed. Is there a way to update the position of this control points when I move the shapes which are connected to the line?
Thanks!
5 1251
Sorry, wildjack. I'm not much of a graphics guy.
I am very interested in feedback on Boa 0.6. I've yet to try switching for 0.5.2 (right in the middle of a big project), but would do it if I heard a few more positive experiences getting the installation to work.
Keep in touch.
Hi Barton,
Although I have previous experience with other languages, I'm new to Python (only a few weeks developing things). I began by installing 0.4.4 to give it a try and started developing this graph editor I commented before. I really liked the IDE, so I checked out 0.6.0 from sourceforge CVS and kept on developing with it. The switch was almost seamless. There was some deprecated stuff in the generated code which wouldn't work with the designer, but substituted the code which wasn't working in a few minutes and everything started running again. As for the rest, 0.6.0 runs smoothly. So far, I haven't experienced any problems with it ( Anyway, take into account that I'm working on a small thing, ~3500 lines). If you have further questions, I'll be glad to help :)
Best regards,
Wildjack
Hi Barton,
Although I have previous experience with other languages, I'm new to Python (only a few weeks developing things). I began by installing 0.4.4 to give it a try and started developing this graph editor I commented before. I really liked the IDE, so I checked out 0.6.0 from sourceforge CVS and kept on developing with it. The switch was almost seamless. There was some deprecated stuff in the generated code which wouldn't work with the designer, but substituted the code which wasn't working in a few minutes and everything started running again. As for the rest, 0.6.0 runs smoothly. So far, I haven't experienced any problems with it ( Anyway, take into account that I'm working on a small thing, ~3500 lines). If you have further questions, I'll be glad to help :)
Best regards,
Wildjack
Thanks Wildjack. I'd definitely appreciate you hanging around the forum a bit. I've been use Boa 0.5.2 for about 9 months and contribute to its development in some small ways (tiny code updates when I find them) so you are actually running a bit of my work. I just get nervous, changing tools in the middle of a project. It truly is a great piece of software. Saves me hours of layout and I've gotten good at adding to & reusing the generated code without upsetting the designer. Tons o' fun!
Keep in touch.
Ok, finally I figured out a way to solve the transparent bg problem for text in lineshapes:
* First we create our own line class inheriting from LineShape.
* Then we override the DrawRegion method, and we comment out the line marked with *** like this: -
def DrawRegion(self, dc, region, x, y):
-
"""Format one region at this position."""
-
if self.GetDisableLabel():
-
return
-
-
w, h = region.GetSize()
-
-
# Get offset from x, y
-
xx, yy = region.GetPosition()
-
-
xp = xx + x
-
yp = yy + y
-
-
# First, clear a rectangle for the text IF there is any
-
if len(region.GetFormattedText()):
-
dc.SetPen(self.GetBackgroundPen())
-
dc.SetBrush(self.GetBackgroundBrush())
-
-
# Now draw the text
-
if region.GetFont():
-
dc.SetFont(region.GetFont())
-
**** #dc.DrawRectangle(xp - w / 2.0, yp - h / 2.0, w, h)
-
-
if self._pen:
-
dc.SetPen(self._pen)
-
dc.SetTextForeground(region.GetActualColourObject())
-
-
DrawFormattedText(dc, region.GetFormattedText(), xp, yp, w, h, region.GetFormatMode())
This quick fix worked for me. So far everything seems to work fine. As for the line control points problem, I have managed to create control points with handles to move them manually (it's not what I intended to do but it is ok for the moment).
Thanks for the OGL update, Wildjack.
Also, I made the upgrade to Boa Constructio 0.6.1. Works great (after I rebooted my machine). Thanks again.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: bjs |
last post by:
I hope I've got the right group here and apologies if I haven't. I'm a
hobby programmer and have just upgraded to Visual Basic.net and have a
couple of questions if anybody can help.
In VB 6...
|
by: hoochiegooch |
last post by:
Hi, all.
I have a couple of questions about NAnt.
1. Is there a better way to invoke NAnt from
a C# "Master Test Rig" than shelling out?
IOW, how should an ASP.NET web app or Windows
Service...
|
by: Rob Somers |
last post by:
Hey people,
I read a good thread on here regarding the reason why we use function
prototypes, and it answered most of my questions, but I wanted to
double check on a couple of things, as I am...
|
by: dln |
last post by:
Howdy. I'm a bit new to C# and got a couple of quick questions that perhaps
someone can help me answer. First, is there a property that you set on a
TextBox control that will force the control to...
|
by: Sccr18 |
last post by:
I just have a couple of easy questions:
1. In Asp.net using Vb is there a way to list all the possible characters
without listing them all like Char() = "abc..."?
2. I was trying to set the focus...
|
by: punt |
last post by:
I've got a couple of questions about a deployed VB.NET application.
Firstly can a deployed application remember any variables(single string)
after being closed down and re-opened, without the use...
|
by: Marc |
last post by:
Hi,
I'm working with a customer that is trying to find a solution to
provide geographical redundancy. Our application is currently using
IBM DB2 v8.2. I have a couple of questions with regards...
|
by: Ron |
last post by:
Hello everyone,
I have a couple of questions really quick questions.
I am creating a dispatch database. What I would really like to do is
have to option of automatically inserting the time...
|
by: melton9 |
last post by:
I'm just getting into using datagrid and have a couple of questions.
1.)How do you get the grid to show the values of a datatable
automatically? Currently I have to hit the + sign and then...
|
by: Newish |
last post by:
Hi
Couple of questions on datagrid
1) Is there a performance issue when using datagrid to display data
from a datatable.
2) Is there a security issue when using datagrid to display data...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: SueHopson |
last post by:
Hi All,
I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...
| |