Completata la modifica per l'errore 6
git-svn-id: svn://10.65.10.50/trunk@65 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b108a12dba
commit
9b980ba6c5
@ -608,9 +608,14 @@ TBrowse_sheet::TBrowse_sheet(TCursor* cursor, const char* fields,
|
|||||||
: TCursor_sheet(cursor, fields, title, head, buttons), _field(f)
|
: TCursor_sheet(cursor, fields, title, head, buttons), _field(f)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
#if XVT_OS == XVT_OS_WIN
|
||||||
xvt_create_control(WC_EDIT, 1, -3, f->size()+1, 1, f->get(), win(),
|
xvt_create_control(WC_EDIT, 1, -3, f->size()+1, 1, f->get(), win(),
|
||||||
CTL_FLAG_DISABLED, 0L, 100);
|
CTL_FLAG_DISABLED, 0L, 100);
|
||||||
|
#else
|
||||||
|
xvt_create_control(WC_EDIT, 1, -3, f->size()+2, 1, f->get(), win(),
|
||||||
|
CTL_FLAG_DISABLED, 0L, 100);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (s && s->items() > 2)
|
if (s && s->items() > 2)
|
||||||
{
|
{
|
||||||
int maxlen = 0;
|
int maxlen = 0;
|
||||||
@ -652,7 +657,7 @@ void TBrowse_sheet::repos_buttons() const
|
|||||||
if (w != NULL_WIN)
|
if (w != NULL_WIN)
|
||||||
{
|
{
|
||||||
RCT r; get_client_rect(w, &r);
|
RCT r; get_client_rect(w, &r);
|
||||||
r.left = CHARX*(id == 99 ? _field->size()+3 : 1);
|
r.left = CHARX*(id == 99 ? _field->size()+4 : 1);
|
||||||
r.top = wr.bottom - 4*CHARY + 4;
|
r.top = wr.bottom - 4*CHARY + 4;
|
||||||
r.right += r.left;
|
r.right += r.left;
|
||||||
r.bottom += r.top;
|
r.bottom += r.top;
|
||||||
@ -674,11 +679,11 @@ bool TBrowse_sheet::on_key(KEY k)
|
|||||||
{
|
{
|
||||||
const long oldsel = selected();
|
const long oldsel = selected();
|
||||||
const TString old(_field->get());
|
const TString old(_field->get());
|
||||||
|
|
||||||
TString val(old.size()+1); val = old;
|
TString val(old.size()+1); val = old;
|
||||||
if (alnum)
|
if (alnum)
|
||||||
{
|
{
|
||||||
if (val.len() > field().size())
|
if (val.len() >= field().size())
|
||||||
val.cut(0);
|
val.cut(0);
|
||||||
val << char(k);
|
val << char(k);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user