#95295# Coordinates of graphic now with Corrfactor
This commit is contained in:
parent
976a562407
commit
180e882822
4 changed files with 15 additions and 12 deletions
|
@ -111,6 +111,8 @@ Dim iThisMonth as Integer
|
|||
DlgCalendar.GetControl("lstHolidays").SelectItemPos(0,True)
|
||||
DlgCalModel.cmdGoOn.DefaultButton = True
|
||||
ToggleWindow(True)
|
||||
fHeightCorrFactor = DlgCalendar.GetControl("imgCountry").Size.Height/198
|
||||
fWidthCorrFactor = DlgCalendar.GetControl("imgCountry").Size.Width/166
|
||||
DlgCalendar.Execute()
|
||||
DlgCalendar.Dispose()
|
||||
Exit Sub
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
|
||||
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog1" dlg:left="160" dlg:top="81" dlg:width="208" dlg:height="156" dlg:page="1" dlg:help-url="HID:34700">
|
||||
<dlg:styles>
|
||||
<dlg:style dlg:style-id="0" dlg:background-color="0xffffff"/>
|
||||
<dlg:style dlg:style-id="0" dlg:background-color="0xffffff" dlg:border="none"/>
|
||||
<dlg:style dlg:style-id="1" dlg:font-name="Cumberland" dlg:font-stylename="Standard" dlg:font-family="modern" dlg:font-charset="ansi"/>
|
||||
<dlg:style dlg:style-id="2" dlg:font-name="Cumberland" dlg:font-stylename="Standard" dlg:font-family="modern" dlg:font-charset="ansi"/>
|
||||
</dlg:styles>
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
Dim CalBitmap As Object
|
||||
Public bSelectByMouseMove as Boolean
|
||||
Public fHeightCorrFactor as Double
|
||||
Public fWidthCorrFactor as Double
|
||||
|
||||
|
||||
' Todo: Adjustmentlistener an der Scrollbar anmelden
|
||||
|
||||
|
@ -56,7 +59,7 @@ Dim ListIndex as Integer
|
|||
Case cLANGUAGE_GERMAN
|
||||
If bSelectByMouseMove Then
|
||||
' oStatusLine.SetText("Position: " & aEvent.X & " ; " & aEvent.Y)
|
||||
ListIndex = CalGetGermanLandAtMousePos(aEvent.X, aEvent.Y, Land$)
|
||||
ListIndex = CalGetGermanLandAtMousePos(CInt(aEvent.X/fWidthCorrFactor), CInt(aEvent.Y/fHeightCorrFactor), Land$)
|
||||
DlgCalendar.GetControl("lstHolidays").SelectItemPos(ListIndex, True)
|
||||
End If
|
||||
End Select
|
||||
|
@ -88,8 +91,6 @@ Dim NullList() as String
|
|||
.txtEvent.Text = ""
|
||||
.txtOwnEventDay.SetPropertyToDefault("Value")
|
||||
.cmdInsert.Enabled = False
|
||||
' Todo: Wie kriegt man den Focus auf dieses verdammte Control?
|
||||
' .txtEvent.DefaultButton = True
|
||||
End With
|
||||
DlgCalendar.GetControl("lstOwnEventMonth").SelectItemPos(0,True)
|
||||
CurOwnMonth = 1
|
||||
|
|
|
@ -29,22 +29,22 @@ Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Int
|
|||
ElseIf (X>=78)And(X<112)And(Y>=95)And(Y<117) Then
|
||||
CalChoosenLand = CalBLThueringen
|
||||
|
||||
ElseIf (X>=112)And(X<155)And(Y>=88)And(Y<114) Then
|
||||
ElseIf (X>=112)And(X<158)And(Y>=88)And(Y<114) Then
|
||||
CalChoosenLand = CalBLSachsen
|
||||
|
||||
ElseIf (X>76)And(X<80)And(Y>35)And(Y<42) Then
|
||||
ElseIf (X>77)And(X<84)And(Y>35)And(Y<42) Then
|
||||
CalChoosenLand = CalBLHamburg
|
||||
|
||||
ElseIf (X>55)And(X<59)And(Y>36)And(Y<41) Then
|
||||
ElseIf (X>56)And(X<60)And(Y>36)And(Y<41) Then
|
||||
CalChoosenLand = CalBLBremen
|
||||
|
||||
ElseIf (X>57)And(X<62)And(Y>44)And(Y<52) Then
|
||||
ElseIf (X>58)And(X<63)And(Y>44)And(Y<52) Then
|
||||
CalChoosenLand = CalBLBremen
|
||||
|
||||
ElseIf (X>52)And(X<95)And(Y>8)And(Y<40) Then
|
||||
CalChoosenLand = CalBLSchlHolstein
|
||||
|
||||
ElseIf (X>90)And(X<146)And(Y>23)And(Y<48) Then
|
||||
ElseIf (X>90)And(X<149)And(Y>23)And(Y<48) Then
|
||||
CalChoosenLand = CalBLMeckPomm
|
||||
|
||||
ElseIf (X>28)And(X<90)And(Y>35)And(Y<69) Then
|
||||
|
@ -53,13 +53,13 @@ Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Int
|
|||
ElseIf (X>60)And(X<90)And(Y>=69)And(Y<95) Then
|
||||
CalChoosenLand = CalBLNiedersachsen
|
||||
|
||||
ElseIf (X>=90)And(X<=112)And(Y>47)And(Y<95) Then
|
||||
ElseIf (X>=90)And(X<=115)And(Y>47)And(Y<95) Then
|
||||
CalChoosenLand = CalBLSachsenAnhalt
|
||||
|
||||
ElseIf (X>127)And(X<135)And(Y>60)And(Y<66) Then
|
||||
ElseIf (X>129)And(X<139)And(Y>60)And(Y<66) Then
|
||||
CalChoosenLand = CalBLBerlin
|
||||
|
||||
ElseIf (X>112)And(X<146)And(Y>=48)And(Y<88) Then
|
||||
ElseIf (X>115)And(X<151)And(Y>=48)And(Y<88) Then
|
||||
CalChoosenLand = CalBLBrandenburg
|
||||
End If
|
||||
CalGetGermanLandAtMousePos = CalChoosenLand
|
||||
|
|
Loading…
Reference in a new issue