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:
guy 2010-01-05 13:40:59 +00:00
parent 2dec83ccc4
commit c36629f744

View File

@ -13,6 +13,7 @@
#include <relation.h>
#include <tabutil.h>
#include <text.h>
#include <toolfld.h>
#include <urldefid.h>
#include <utility.h>
#include <validate.h>
@ -5267,31 +5268,44 @@ void TZoom_field::create(WINDOW parent)
class TZoom_mask : public TAutomask
{
protected:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
public:
TZoom_mask(const char * prompt);
virtual ~TZoom_mask() {}
TZoom_mask(const char* prompt, int width = 70);
};
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;
}
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 autoend = AUTOEND;
AUTOSELECT = false;
AUTOEND = true;
add_memo(101, 0, prompt, 1, 0, -1, -3);
add_button(DLG_OK, 0, "", -12, -1, 10, 2);
add_button(DLG_CANCEL, 0, "", -22, -1, 10, 2);
AUTOEND = false;
AUTOSELECT = select;
add_button_tool(DLG_OK, "", TOOL_OK);
add_button_tool(DLG_DELREC, "Azzera", TOOL_DELREC);
add_button_tool(DLG_CANCEL, "", TOOL_CANCEL);
add_memo(DLG_USER, 0, "", 1, 0, width, -2);
set_handlers();
AUTOSELECT = select;
AUTOEND = autoend;
}
bool TZoom_field::on_key( KEY key )
@ -5309,21 +5323,21 @@ bool TZoom_field::on_key( KEY key )
case K_F8:
{
get_window_data();
TZoom_mask m(prompt());
TZoom_mask m(prompt(), size());
if (__k)
{
_str << (const char) __k;
_str << (const char)__k;
__k = '\0';
}
m.set(101, _str);
m.set(DLG_USER, _str);
if (m.run() == K_ENTER && !read_only())
{
_str = m.get(101);
_str = m.get(DLG_USER);
set_window_data(raw2win(_str));
}
return TRUE;
return true;
}
break;
default:
@ -5357,6 +5371,7 @@ const char* TZoom_field::reformat(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);
int a_capo = str.find('\n');
@ -5368,6 +5383,9 @@ const char* TZoom_field::raw2win(const char* data) const
_ctl_data._park = str;
str[a_capo] = c;
return _ctl_data._park;
*/
TParagraph_string instr(data, size());
return instr.get(0);
}
const char* TZoom_field::win2raw(const char* data) const