[kde-edu]: Question about Kig scripting

Maurizio Paolini paolini at dmf.unicatt.it
Tue Oct 18 09:33:38 CEST 2005


On Mon, Oct 17, 2005 at 04:43:43PM +0200, Miguel Marco wrote:
> Hi.
> 
> I plan to use Kig in a course of linear geometry i am teaching. I hev found 
> most of the features i need in it, but i have a little trouble to calculate 
> the ration determined by three points in a line.
> 
> I have done a scirpt that returns a point whose coordinates are (r,0), where r 
> is the number i am looking for, and then take the x coordinate of it, but the 
> problems is that, as i move the points, this resulting point moves too, and 
> also does the label with its x coordinate, making it go outside the screen in 
> some cases.
> 
> So my question would be: is there a way of creating a script that gives a 
> result a text label? Or otherways: is there a way to make the text label 
> corresponding to a point remain fixed?

You can make the text label fixed by right-clicking on it, then select "redefine",
click on any place on the canvas and then accept all the defaults.

Also, it is possible to create a fixed label from the beginning:
- click on the "text" button
- click anywhere on the screen
- enter "%1" (without the double quotes) as text
- click on "next"
- click on "argument 1"
- click on the point whose coordinate you need
- click on "X coordinate"
- click on "Finish".

Of course you can enter any text instead of %1, e.g.
"The ratio is %1."

Cheers,
Maurizio Paolini


More information about the kde-edu mailing list