[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:
Benoît Minisini 2016-01-02 15:24:06 +00:00
parent 66f5c498d2
commit f5b820db71
6 changed files with 35 additions and 9 deletions

View file

@ -18,12 +18,12 @@ LastCommit="[GB.DESKTOP]\n* BUG: Change the Mime loading code so it not fail on
[OpenFile]
File[1]=".src/DesktopMime.class:0.90"
Active=7
Active=5
File[2]=".src/Tests/Form11.form"
Count=7
File[3]=".src/Main.module:18.10"
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[7]="xdg-utils/xdg-open:7.517"

View file

@ -589,7 +589,7 @@ m
(sStyle)s
_GetColor
m
M
s
(iCol)i
_EndStyleSheet
@ -1531,6 +1531,10 @@ Wrap
p
b
Width
p
s
:_Fake
:

View file

@ -244,7 +244,11 @@ Public Sub _RenderStyleSheet()
Else
If $bExpand Then _AddStyleSheet("flex-grow:1;")
If $bExpand Then
_AddStyleSheet("flex-grow:1;")
Else
_AddStyleSheet("flex-shrink:0;")
Endif
hParent = Me.Parent
If hParent Then
@ -589,7 +593,7 @@ Private Sub Foreground_Write(Value As Integer)
End
Public Sub _GetColor(iCol As Integer) As String
Static Public Sub _GetColor(iCol As Integer) As String
Dim A As Integer
Dim R As Integer

View file

@ -6,6 +6,7 @@ Property Text As String
Property Expand As Boolean
Property Alignment As Integer
Property Wrap As Boolean
Property Width As String
Event _Fake
@ -15,6 +16,7 @@ Private $sText As String
Private $bExpand As Boolean
Private $iAlignment As Integer
Private $bNoWrap As Boolean
Private $sWidth As String
Private Sub GetTable() As WebTable
@ -89,3 +91,16 @@ Private Sub Wrap_Write(Value As Boolean)
GetTable()._SetProperty("#[" & CStr(_Column) & "].wrap", Value)
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

View file

@ -63,7 +63,11 @@ Public Sub _Render()
For Each hCol In $aColumns
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 "<div";
hCol._PrintAlignment()

View file

@ -233,9 +233,9 @@ P:first-child,UL:first-child,OL:first-child {
}
.gw-label {
white-space: nowrap;
display: flex;
align-items: center;
align-items: baseline;
overflow: hidden;
}
#gw-modal {
@ -497,4 +497,3 @@ P:first-child,UL:first-child,OL:first-child {
.gw-table > DIV > TABLE > TBODY > TR:hover {
background-color: #F0F0F0;
}