Patch level : 10.0
Files correlati : ve0.exe Ricompilazione Demo : [ ] Commento : 0001527: 001910 - ricerca per descrizione - Presscolor Se tramite il mouse mi posiziono sulla descrizione articolo, il cursore si posiziona ma lascia uno spazio, quindi scrivo blank+descrizione, cliccando sulla lente la ricerca sembra malfunzionante. Se faccio doppio click sulla riga, anzichè il puntino viene lasciato uno spazio bianco git-svn-id: svn://10.65.10.50/trunk@19872 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2dec83ccc4
commit
c36629f744
@ -13,6 +13,7 @@
|
|||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
|
#include <toolfld.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <validate.h>
|
#include <validate.h>
|
||||||
@ -5267,31 +5268,44 @@ void TZoom_field::create(WINDOW parent)
|
|||||||
|
|
||||||
class TZoom_mask : public TAutomask
|
class TZoom_mask : public TAutomask
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TZoom_mask(const char * prompt);
|
TZoom_mask(const char* prompt, int width = 70);
|
||||||
virtual ~TZoom_mask() {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool TZoom_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
bool TZoom_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
{
|
{
|
||||||
|
switch (o.dlg())
|
||||||
|
{
|
||||||
|
case DLG_DELREC:
|
||||||
|
if (e == fe_button)
|
||||||
|
{
|
||||||
|
reset(DLG_USER);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TZoom_mask::TZoom_mask(const char * prompt) : TAutomask("Zoom", 1, 72, 18)
|
TZoom_mask::TZoom_mask(const char* prompt, int width) : TAutomask(prompt, 1, width+2, 18)
|
||||||
{
|
{
|
||||||
const bool select = AUTOSELECT;
|
const bool select = AUTOSELECT;
|
||||||
|
const bool autoend = AUTOEND;
|
||||||
AUTOSELECT = false;
|
AUTOSELECT = false;
|
||||||
AUTOEND = true;
|
AUTOEND = true;
|
||||||
add_memo(101, 0, prompt, 1, 0, -1, -3);
|
|
||||||
add_button(DLG_OK, 0, "", -12, -1, 10, 2);
|
add_button_tool(DLG_OK, "", TOOL_OK);
|
||||||
add_button(DLG_CANCEL, 0, "", -22, -1, 10, 2);
|
add_button_tool(DLG_DELREC, "Azzera", TOOL_DELREC);
|
||||||
AUTOEND = false;
|
add_button_tool(DLG_CANCEL, "", TOOL_CANCEL);
|
||||||
AUTOSELECT = select;
|
add_memo(DLG_USER, 0, "", 1, 0, width, -2);
|
||||||
set_handlers();
|
set_handlers();
|
||||||
|
|
||||||
|
AUTOSELECT = select;
|
||||||
|
AUTOEND = autoend;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TZoom_field::on_key( KEY key )
|
bool TZoom_field::on_key( KEY key )
|
||||||
@ -5309,21 +5323,21 @@ bool TZoom_field::on_key( KEY key )
|
|||||||
case K_F8:
|
case K_F8:
|
||||||
{
|
{
|
||||||
get_window_data();
|
get_window_data();
|
||||||
TZoom_mask m(prompt());
|
TZoom_mask m(prompt(), size());
|
||||||
|
|
||||||
if (__k)
|
if (__k)
|
||||||
{
|
{
|
||||||
_str << (const char) __k;
|
_str << (const char)__k;
|
||||||
__k = '\0';
|
__k = '\0';
|
||||||
}
|
}
|
||||||
m.set(101, _str);
|
m.set(DLG_USER, _str);
|
||||||
|
|
||||||
if (m.run() == K_ENTER && !read_only())
|
if (m.run() == K_ENTER && !read_only())
|
||||||
{
|
{
|
||||||
_str = m.get(101);
|
_str = m.get(DLG_USER);
|
||||||
set_window_data(raw2win(_str));
|
set_window_data(raw2win(_str));
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -5357,6 +5371,7 @@ const char* TZoom_field::reformat(const char* data) const
|
|||||||
|
|
||||||
const char* TZoom_field::raw2win(const char* data) const
|
const char* TZoom_field::raw2win(const char* data) const
|
||||||
{
|
{
|
||||||
|
/* Ufficio complicazione affari semplici ai suoi massimi livelli d'espressione
|
||||||
TFixed_string str(data);
|
TFixed_string str(data);
|
||||||
int a_capo = str.find('\n');
|
int a_capo = str.find('\n');
|
||||||
|
|
||||||
@ -5368,6 +5383,9 @@ const char* TZoom_field::raw2win(const char* data) const
|
|||||||
_ctl_data._park = str;
|
_ctl_data._park = str;
|
||||||
str[a_capo] = c;
|
str[a_capo] = c;
|
||||||
return _ctl_data._park;
|
return _ctl_data._park;
|
||||||
|
*/
|
||||||
|
TParagraph_string instr(data, size());
|
||||||
|
return instr.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* TZoom_field::win2raw(const char* data) const
|
const char* TZoom_field::win2raw(const char* data) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user