#95295# Coordinates of graphic now with Corrfactor

This commit is contained in:
Behrend Cornelius 2001-12-12 11:50:15 +00:00
parent 976a562407
commit 180e882822
4 changed files with 15 additions and 12 deletions

View file

@ -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

View file

@ -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>

View file

@ -4,6 +4,9 @@
Dim CalBitmap As Object
Public bSelectByMouseMove as Boolean
Public fHeightCorrFactor as Double
Public fWidthCorrFactor as Double
&apos; Todo: Adjustmentlistener an der Scrollbar anmelden
@ -56,7 +59,7 @@ Dim ListIndex as Integer
Case cLANGUAGE_GERMAN
If bSelectByMouseMove Then
&apos; oStatusLine.SetText(&quot;Position: &quot; &amp; aEvent.X &amp; &quot; ; &quot; &amp; aEvent.Y)
ListIndex = CalGetGermanLandAtMousePos(aEvent.X, aEvent.Y, Land$)
ListIndex = CalGetGermanLandAtMousePos(CInt(aEvent.X/fWidthCorrFactor), CInt(aEvent.Y/fHeightCorrFactor), Land$)
DlgCalendar.GetControl(&quot;lstHolidays&quot;).SelectItemPos(ListIndex, True)
End If
End Select
@ -88,8 +91,6 @@ Dim NullList() as String
.txtEvent.Text = &quot;&quot;
.txtOwnEventDay.SetPropertyToDefault(&quot;Value&quot;)
.cmdInsert.Enabled = False
&apos; Todo: Wie kriegt man den Focus auf dieses verdammte Control?
&apos; .txtEvent.DefaultButton = True
End With
DlgCalendar.GetControl(&quot;lstOwnEventMonth&quot;).SelectItemPos(0,True)
CurOwnMonth = 1

View file

@ -29,22 +29,22 @@ Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Int
ElseIf (X&gt;=78)And(X&lt;112)And(Y&gt;=95)And(Y&lt;117) Then
CalChoosenLand = CalBLThueringen
ElseIf (X&gt;=112)And(X&lt;155)And(Y&gt;=88)And(Y&lt;114) Then
ElseIf (X&gt;=112)And(X&lt;158)And(Y&gt;=88)And(Y&lt;114) Then
CalChoosenLand = CalBLSachsen
ElseIf (X&gt;76)And(X&lt;80)And(Y&gt;35)And(Y&lt;42) Then
ElseIf (X&gt;77)And(X&lt;84)And(Y&gt;35)And(Y&lt;42) Then
CalChoosenLand = CalBLHamburg
ElseIf (X&gt;55)And(X&lt;59)And(Y&gt;36)And(Y&lt;41) Then
ElseIf (X&gt;56)And(X&lt;60)And(Y&gt;36)And(Y&lt;41) Then
CalChoosenLand = CalBLBremen
ElseIf (X&gt;57)And(X&lt;62)And(Y&gt;44)And(Y&lt;52) Then
ElseIf (X&gt;58)And(X&lt;63)And(Y&gt;44)And(Y&lt;52) Then
CalChoosenLand = CalBLBremen
ElseIf (X&gt;52)And(X&lt;95)And(Y&gt;8)And(Y&lt;40) Then
CalChoosenLand = CalBLSchlHolstein
ElseIf (X&gt;90)And(X&lt;146)And(Y&gt;23)And(Y&lt;48) Then
ElseIf (X&gt;90)And(X&lt;149)And(Y&gt;23)And(Y&lt;48) Then
CalChoosenLand = CalBLMeckPomm
ElseIf (X&gt;28)And(X&lt;90)And(Y&gt;35)And(Y&lt;69) Then
@ -53,13 +53,13 @@ Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Int
ElseIf (X&gt;60)And(X&lt;90)And(Y&gt;=69)And(Y&lt;95) Then
CalChoosenLand = CalBLNiedersachsen
ElseIf (X&gt;=90)And(X&lt;=112)And(Y&gt;47)And(Y&lt;95) Then
ElseIf (X&gt;=90)And(X&lt;=115)And(Y&gt;47)And(Y&lt;95) Then
CalChoosenLand = CalBLSachsenAnhalt
ElseIf (X&gt;127)And(X&lt;135)And(Y&gt;60)And(Y&lt;66) Then
ElseIf (X&gt;129)And(X&lt;139)And(Y&gt;60)And(Y&lt;66) Then
CalChoosenLand = CalBLBerlin
ElseIf (X&gt;112)And(X&lt;146)And(Y&gt;=48)And(Y&lt;88) Then
ElseIf (X&gt;115)And(X&lt;151)And(Y&gt;=48)And(Y&lt;88) Then
CalChoosenLand = CalBLBrandenburg
End If
CalGetGermanLandAtMousePos = CalChoosenLand