Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9285ff
)
ecere/gui/DataBox: (#849) Default size for SavingDataBox
author
Jerome St-Louis
<jerome@ecere.com>
Thu, 8 Aug 2013 00:00:51 +0000
(20:00 -0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Thu, 8 Aug 2013 00:00:51 +0000
(20:00 -0400)
- Nicer for dragging it from the toolbox
ecere/src/gui/controls/DataBox.ec
patch
|
blob
|
history
diff --git
a/ecere/src/gui/controls/DataBox.ec
b/ecere/src/gui/controls/DataBox.ec
index
91f46d3
..
b422867
100644
(file)
--- a/
ecere/src/gui/controls/DataBox.ec
+++ b/
ecere/src/gui/controls/DataBox.ec
@@
-232,4
+232,18
@@
public class SavingDataBox : DataBox
}
return DataBox::OnKeyDown(key, ch);
}
+
+ bool OnResizing(int * w, int * h)
+ {
+ if(!*w || !*h)
+ {
+ int spaceH;
+ display.FontExtent(fontObject, " ", 1, null, &spaceH);
+ if(!*h)
+ *h = spaceH + 2;
+ if(!*w)
+ *w = spaceH * 80 / 14;
+ }
+ return true;
+ }
}