hast ja recht, ich hab den CODE mal eingestellt !! Die 10 % - 90 % sind so drunter geschoben dass man aber noch sieht wo sie sind, die 100 % sind noch da. Endprodukt soll sein, dass die Zahlen auf den Linien stehen. !!
Code: Alles auswählen
Enumeration
#Window_2
#Text_f209 : #Text_f210 : #Text_f211 : #Text_f214
#Text_f216 : #Text_f217 : #Text_f218
#Schrift_1 : #Schrift_2
#Container_200 : #Container_201
#MenuBar_2 : #Menu_1
EndEnumeration
Schrift_2.l = LoadFont(#Schrift_1,"Sans",12)
Schrift_3.l = LoadFont(#Schrift_2,"Sans",8)
OpenWindow(#Window_2,10,10,1000,680," Kreuz - Kalkulation (c) Fischer EDV 2010",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_TitleBar)
If CreateMenu(#MenuBar_2, WindowID(#Window_2))
MenuTitle("Datei")
MenuItem(#Menu_1,"Beenden")
EndIf
ContainerGadget(#Container_200,515,225,470, 350,#PB_Container_Raised )
SetGadgetColor(#Container_200,#PB_Gadget_BackColor , $A5F2FA)
TextGadget(#Text_f214,320,15,100,20,"")
SetGadgetColor(#Text_f214, #PB_Gadget_BackColor ,$9AFBFD)
CloseGadgetList()
ContainerGadget(#Container_201,515,5,470, 200,#PB_Container_Raised )
SetGadgetColor(#Container_201, #PB_Gadget_BackColor ,$D8D7DA)
TextGadget(#Text_f209,40,137,120,15,"Erreichter DB")
SetGadgetColor(#Text_f209,#PB_Gadget_BackColor,$F8F6F8)
TextGadget(#Text_f210,200,137,120,15,"Mindest DB ")
SetGadgetColor(#Text_f210,#PB_Gadget_BackColor,$F8F6F8)
TextGadget(#Text_f211,350,137,120,15,"Ziel DB ")
SetGadgetColor(#Text_f211,#PB_Gadget_BackColor,$F8F6F8)
SetGadgetFont(#PB_Default,FontID(#Schrift_1))
TextGadget(#Text_f216, 10,160,180,25,"")
TextGadget(#Text_f217,170,160,180,25,"")
TextGadget(#Text_f218,320,160,180,25,"")
SetGadgetFont(#PB_Default,#PB_Default)
CloseGadgetList()
StartDrawing(WindowOutput(#Window_2))
Box(517, 140, 466, 20, $F8F6F8)
SetGadgetText(#Text_f214,"Netto KV = 100 %")
SetGadgetColor(#Text_f214, #PB_Gadget_BackColor,-1)
Box(535, 270, 420, 290,$4C3F4C) ;Hintergrund
Box(536, 271, 418, 288,$E2DDE1) ;100 % Hellelfenbein
DrawingFont(Schrift_3.l)
;DrawingMode(#PB_2DDrawing_Transparent)
DrawText(570,580,"Material",$705517)
DrawText(600,605,"Fremdleistung",$33764D)
DrawText(645,580,"Wertschöpfung",$62198A)
DrawText(720,605,"Lohn",$03B1B5)
DrawText(775,580,"DB",$1912B0)
DrawText(815,605,"Ertrag",$F08D2A)
Mat.f = 8000.00
Wert.f = 5000.00
LoSu.f = 5500.00
Stud.f = 100.00
Matbrut.f = 9000.00
Lohbrut.f = 6500.00
MatGew.f = 200.00
MGew.f = 500.00
Zaehler.l = 0
Mine.f = 15000.00
DeBe.f = 2000.00
DeBeSt.f = 20.00
y1 = 559 : ab = 28.8 : zl = 10
For lin = 1 To 10
If lin <= 9
LineXY(536,y1-ab,954,y1-ab,$83A28B) ;Linien Zeichnen
DrawText( 510,y1-ab-5,Str(zl)+" %",$7BFF84) ;Das sollte auf die Fläche
Else
DrawText( 480,y1-ab-5,Str(zl)+" %",$0D08C6) ;Den hab ich mal gelassen dass man was sieht
EndIf
ab = ab + 28.8 : zl = zl + 10
Next
;Linie für Mindest DB Darstellen
linmdb.f = Stud.f * 20.00
ProzMdb.f = (linmdb.f * 100) / Mine.f
y = 2.88 * ProzMdb.f -3
Line(536,559 - y,418,0,$1608C2)
;Linie für Ziel DB Darstellen
linzdb.f = Stud.f * 28.00
ProzZdb.f = (linzdb.f *100) / Mine.f
y = 2.88 * ProzZdb.f -3
Line(536,559 - y,418,0,$2D8E6E)
;Netto Wert 100 %
y = 2.88 * 100
Box(880,559,48,-y,$000000)
Box(880,559,47,-y,$4A4A4A)
;Material Netto
ProzMat.f = (Mat.f * 100) / Mine.f
y = 2.88 * ProzMat.f - 3
Box(571,559,48,-y,$000000)
Box(571,559,47,-y ,$F08D2A)
DrawText(595,559-y-5,StrF(ProzMat.f,2)+" %")
;Fremdleistung
ProzFremd.f = (Fremd.f * 100) / Mine.f
y = 2.88 * ProzFremd.f - 3
Box(619,559,48,-y,$000000)
Box(619,559,47,-y ,$47BD7D)
;Wertschöpfung
ProzWert.f = (Wert.f * 100) / Mine.f
y = 2.88 * ProzWert.f - 2
Box(667,559,48,-y,$000000)
Box(667,559,47,-y ,$691296)
;Lohn
ProzLohn.f = (LoSu.f * 100) / Mine.f
y = 2.88 * ProzLohn.f - 2
Box(715,559,48,-y,$000000)
Box(715,559,47,-y ,$04E8ED)
;Deckungsbeitrag
ProzDeBe.f = (DeBe.f * 100) / Mine.f
y = 2.88 * ProzDeBe.f - 2
Box(763,559,48,-y,$000000)
Box(763,559,47,-y ,$210CDE)
;Ertrag
ProzGewi.f = (Gewi.f * 100) / Mine.f
y = 2.88 * ProzGewi - 2
Box(811,559,48,-y,$000000)
Box(811,559,47,-y ,$ECF94B)
StopDrawing()
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Menu
Select EventMenu()
;Hauptfenster Schliessen
Case #Menu_1
CloseWindow(#Window_2)
End
EndSelect
EndIf
Until EventID = #PB_Event_CloseWindow
End