LookupGrid: Fix Form text, fix form sticking out of monitor when there is no space
This commit is contained in:
parent
6891642b37
commit
87335beff8
@ -257,13 +257,26 @@ Public Class RepositoryItemLookupControl3
|
||||
.PreventDuplicates = PreventDuplicates,
|
||||
.DataSource = DataSource,
|
||||
.SelectedValues = SelectedValues,
|
||||
.StartPosition = FormStartPosition.Manual,
|
||||
.Location = OwnerEdit.PointToScreen(New Point(OwnerEdit.Width, 0))
|
||||
.StartPosition = FormStartPosition.Manual
|
||||
}
|
||||
Dim oScreen = Screen.FromControl(oForm)
|
||||
oForm.Location = GetFormLocation(oForm.Height, oForm.Width, oScreen)
|
||||
|
||||
Return oForm
|
||||
End Function
|
||||
|
||||
Private Function GetFormLocation(pFormHeight As Integer, pFormWidth As Integer, pScreen As Screen) As Point
|
||||
' This is the location on the same height like the Lookup Control
|
||||
Dim oDefaultLocation = OwnerEdit.PointToScreen(New Point(OwnerEdit.Width, 0))
|
||||
Dim oScreenheight = pScreen.Bounds.Height
|
||||
|
||||
If oScreenheight < (oDefaultLocation.Y + pFormHeight) Then
|
||||
Return OwnerEdit.PointToScreen(New Point(OwnerEdit.Width, -pFormHeight + OwnerEdit.Height))
|
||||
End If
|
||||
|
||||
Return oDefaultLocation
|
||||
End Function
|
||||
|
||||
Protected Overrides Sub RaiseButtonClick(e As ButtonPressedEventArgs)
|
||||
MyBase.RaiseButtonClick(e)
|
||||
|
||||
|
||||
@ -94,9 +94,9 @@ Namespace My.Resources
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Bitte wählen Sie einen oder mehrere Werte aus: ähnelt.
|
||||
'''</summary>
|
||||
Friend Shared ReadOnly Property PopupForm_TextMultiLine() As String
|
||||
Friend Shared ReadOnly Property PopupForm_TextMultiselect() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("PopupForm_TextMultiLine", resourceCulture)
|
||||
Return ResourceManager.GetString("PopupForm_TextMultiselect", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
<data name="PopupForm_Text" xml:space="preserve">
|
||||
<value>Please choose a value:</value>
|
||||
</data>
|
||||
<data name="PopupForm_TextMultiLine" xml:space="preserve">
|
||||
<data name="PopupForm_TextMultiselect" xml:space="preserve">
|
||||
<value>Please choose one or more values:</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -126,7 +126,7 @@
|
||||
<data name="PopupForm_Text" xml:space="preserve">
|
||||
<value>Bitte wählen Sie einen Wert aus:</value>
|
||||
</data>
|
||||
<data name="PopupForm_TextMultiLine" xml:space="preserve">
|
||||
<data name="PopupForm_TextMultiselect" xml:space="preserve">
|
||||
<value>Bitte wählen Sie einen oder mehrere Werte aus:</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -65,10 +65,10 @@ Public Class frmLookupGrid
|
||||
oCheckboxColumn.OptionsColumn.AllowFocus = False
|
||||
|
||||
|
||||
Text = _R.GetString("PopupForm_Text")
|
||||
Text = _R.GetString("PopupForm_TextMultiselect")
|
||||
_DataColumn = 1
|
||||
Else
|
||||
Text = _R.GetString("PopupForm_TextMultiLine")
|
||||
Text = _R.GetString("PopupForm_Text")
|
||||
_DataColumn = 0
|
||||
End If
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user