[GB.WEB.FORM]
* NEW: WebControl: If Expand is FALSE, then prevent the control from shrinking. * NEW: WebTable: Columns now have a Width property, which defines its minimum width. * NEW: WebLabel: Allow wrapping, but align vertically to the baseline and hides overflowing text. Not perfect yet... :-( git-svn-id: svn://localhost/gambas/trunk@7543 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
66f5c498d2
commit
f5b820db71
6 changed files with 35 additions and 9 deletions
|
@ -18,12 +18,12 @@ LastCommit="[GB.DESKTOP]\n* BUG: Change the Mime loading code so it not fail on
|
||||||
|
|
||||||
[OpenFile]
|
[OpenFile]
|
||||||
File[1]=".src/DesktopMime.class:0.90"
|
File[1]=".src/DesktopMime.class:0.90"
|
||||||
Active=7
|
Active=5
|
||||||
File[2]=".src/Tests/Form11.form"
|
File[2]=".src/Tests/Form11.form"
|
||||||
Count=7
|
Count=7
|
||||||
File[3]=".src/Main.module:18.10"
|
File[3]=".src/Main.module:18.10"
|
||||||
File[4]=".src/DesktopFile.class:0.347"
|
File[4]=".src/DesktopFile.class:0.347"
|
||||||
File[5]=".src/Desktop.class:13.83"
|
File[5]=".src/Desktop.class:2.570"
|
||||||
File[6]=".src/DesktopWatcher.class:2.33"
|
File[6]=".src/DesktopWatcher.class:2.33"
|
||||||
File[7]="xdg-utils/xdg-open:7.517"
|
File[7]="xdg-utils/xdg-open:7.517"
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,7 @@ m
|
||||||
|
|
||||||
(sStyle)s
|
(sStyle)s
|
||||||
_GetColor
|
_GetColor
|
||||||
m
|
M
|
||||||
s
|
s
|
||||||
(iCol)i
|
(iCol)i
|
||||||
_EndStyleSheet
|
_EndStyleSheet
|
||||||
|
@ -1531,6 +1531,10 @@ Wrap
|
||||||
p
|
p
|
||||||
b
|
b
|
||||||
|
|
||||||
|
Width
|
||||||
|
p
|
||||||
|
s
|
||||||
|
|
||||||
:_Fake
|
:_Fake
|
||||||
:
|
:
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,11 @@ Public Sub _RenderStyleSheet()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If $bExpand Then _AddStyleSheet("flex-grow:1;")
|
If $bExpand Then
|
||||||
|
_AddStyleSheet("flex-grow:1;")
|
||||||
|
Else
|
||||||
|
_AddStyleSheet("flex-shrink:0;")
|
||||||
|
Endif
|
||||||
|
|
||||||
hParent = Me.Parent
|
hParent = Me.Parent
|
||||||
If hParent Then
|
If hParent Then
|
||||||
|
@ -589,7 +593,7 @@ Private Sub Foreground_Write(Value As Integer)
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Public Sub _GetColor(iCol As Integer) As String
|
Static Public Sub _GetColor(iCol As Integer) As String
|
||||||
|
|
||||||
Dim A As Integer
|
Dim A As Integer
|
||||||
Dim R As Integer
|
Dim R As Integer
|
||||||
|
|
|
@ -6,6 +6,7 @@ Property Text As String
|
||||||
Property Expand As Boolean
|
Property Expand As Boolean
|
||||||
Property Alignment As Integer
|
Property Alignment As Integer
|
||||||
Property Wrap As Boolean
|
Property Wrap As Boolean
|
||||||
|
Property Width As String
|
||||||
|
|
||||||
Event _Fake
|
Event _Fake
|
||||||
|
|
||||||
|
@ -15,6 +16,7 @@ Private $sText As String
|
||||||
Private $bExpand As Boolean
|
Private $bExpand As Boolean
|
||||||
Private $iAlignment As Integer
|
Private $iAlignment As Integer
|
||||||
Private $bNoWrap As Boolean
|
Private $bNoWrap As Boolean
|
||||||
|
Private $sWidth As String
|
||||||
|
|
||||||
Private Sub GetTable() As WebTable
|
Private Sub GetTable() As WebTable
|
||||||
|
|
||||||
|
@ -89,3 +91,16 @@ Private Sub Wrap_Write(Value As Boolean)
|
||||||
GetTable()._SetProperty("#[" & CStr(_Column) & "].wrap", Value)
|
GetTable()._SetProperty("#[" & CStr(_Column) & "].wrap", Value)
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
Private Function Width_Read() As String
|
||||||
|
|
||||||
|
Return $sWidth
|
||||||
|
|
||||||
|
End
|
||||||
|
|
||||||
|
Private Sub Width_Write(Value As String)
|
||||||
|
|
||||||
|
$sWidth = Value
|
||||||
|
GetTable()._SetProperty("#[" & CStr(_Column) & "].width", Value)
|
||||||
|
|
||||||
|
End
|
||||||
|
|
|
@ -63,7 +63,11 @@ Public Sub _Render()
|
||||||
|
|
||||||
For Each hCol In $aColumns
|
For Each hCol In $aColumns
|
||||||
Print "<th";
|
Print "<th";
|
||||||
If hCol.Expand Then Print " width=\"100%\"";
|
If hCol.Expand Then
|
||||||
|
Print " width=\"100%\"";
|
||||||
|
Else If hCol.Width Then
|
||||||
|
Print " style=\"min-width:"; hCol.Width; ";\"";
|
||||||
|
Endif
|
||||||
Print ">";
|
Print ">";
|
||||||
Print "<div";
|
Print "<div";
|
||||||
hCol._PrintAlignment()
|
hCol._PrintAlignment()
|
||||||
|
|
|
@ -233,9 +233,9 @@ P:first-child,UL:first-child,OL:first-child {
|
||||||
}
|
}
|
||||||
|
|
||||||
.gw-label {
|
.gw-label {
|
||||||
white-space: nowrap;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: baseline;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#gw-modal {
|
#gw-modal {
|
||||||
|
@ -497,4 +497,3 @@ P:first-child,UL:first-child,OL:first-child {
|
||||||
.gw-table > DIV > TABLE > TBODY > TR:hover {
|
.gw-table > DIV > TABLE > TBODY > TR:hover {
|
||||||
background-color: #F0F0F0;
|
background-color: #F0F0F0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue