Как Динамически менять св-во поля в браузере?
Модераторы: m0p3e, edward_K, Модераторы
Как Динамически менять св-во поля в браузере?
пытаюсь так:
cfsSetCurrentContainer(Мой браузер');
cfsSetProp('Поле','Skip', false);
не получаеццо. Как победь, уважаемые?
cfsSetCurrentContainer(Мой браузер');
cfsSetProp('Поле','Skip', false);
не получаеццо. Как победь, уважаемые?
поставил мессаджи, все равно нули, вот интерфейс
В чем проблема? Как в пик прописать?
Код: Выделить всё
#declare SetMyFont (pPicked)
{Font =
{
Color = if(#pPicked <> '', ColorSysBlue, 0 );
Bold = if(#pPicked <> '', true , false );
Italic = if(#pPicked <> '', true , false )
}
}
#end
const
#include fldcolor.inc
#include galnet.ccm
#include galnet.csc
end;
//----------------------begin Interface IfcSelDogSpec---------------------
Interface IfcSelDogSpec 'Выбор спецификаций' Cyan, doaccept;
Show At (1,1,60,20)
Create View Vmain
var
CurOwner : comp ;
Marker : longint;
Ind : longint;
tmpCount : double ;
As
Select
*,
if(spdocs.prmc = 1, katmc.name, katusl.name) (FieldName NameMCUSL),
if(spdocs.prmc = 1, pick_mc.pickkol, pick_usl.pickkol) (FieldName KolMCUSL),
if(SearchMarker(Marker,dogovor.nrec, Ind), 'V','')(FieldName=picked)
From
Dogovor,
dogovor spec_dovor,
spdocs,
pick pick_usl,
pick pick_mc
Where
((
CurOwner == dogovor.cdogovor
and dogovor.nrec == spdocs.cdoc
and dogovor.tidk == spdocs.tidk
and spdocs.cmcusl == katmc.nrec
and spdocs.cmcusl == katusl.nrec
and spdocs.cotped == katotped.nrec
and katmc.nrec == pick_mc.crec
and 8 == pick_mc.wlist
and katusl.nrec == pick_usl.crec
and 5 == pick_usl.wlist
)) order by dogovor.ddoc;
/*******************************************************************************
SetUnsetPick - 01/21/2008 1:54
********************************************************************************/
Procedure SetUnsetPick;
var c1: word; c2: comp
{
cfsSetProp('KolMCUSL','Skip', if(picked='', false, true));
_loop spdocs{
if(picked='')
if(spdocs.prmc = 1)
delete pick_mc where(( c2 == pick_mc.crec and 8 == pick_mc.wlist));
else
delete pick_usl where(( c2 == pick_usl.crec and 8 == pick_usl.wlist));
c2 := if(spdocs.prmc = 1, katmc.nrec, katusl.nrec);
if(c2 = comp(0)) exit;
if(spdocs.prmc = 1)
insert into pick_mc set pick_mc.crec = c2, pick_mc.wlist = 8;
else
insert into pick_usl set pick_usl.crec = c2, pick_usl.wlist = 5;
}
} //SetUnsetPick
//------------------------------ Begin MarkAll ------------------------------
procedure MarkAll(IsInsert: boolean);
{
StartNewVisual( vtRotateVisual, vfTimer, 'Пометить все',1);
PushPos(#Dogovor);
if ((Modifier GetFirst Dogovor) = tsOk){
do{
if(not IsInsert)
InvertMarker(Marker , Dogovor.nrec);
else InsertMarker(Marker, Dogovor.nrec);
SetUnsetPick();
NextVisual;
}while (Modifier GetNext Dogovor = tsOk)
}
PopPos(#Dogovor);
StopVisual('', 0);
RescanPanel(#Dogovor);
}
//------------------------------ End MarkAll ------------------------------
panel ptree
tree TreeMain(,,sci178InsPM)
show at(,,,15);
table Dogovor;
fields
picked 'V' : [3], NOAutoSize, #setMyFont(picked), skip;
Dogovor.ddoc 'Дата' : [8], protect, #setMyFont(picked);
Dogovor.descr 'Дескр' : [3], protect, #setMyFont(picked);
Dogovor.nodoc '№ Док' : [6], protect, #setMyFont(picked);
Dogovor.summa 'Сума' : protect;
end;
handleevent
cmTreeTop : {
curOwner := 0;
}
cmTreeDown : {
curOwner := vMain.Dogovor.nrec;
}
cmTreeUp:{
curOwner := vMain.dogovor.cdogovor;
}
cmTreeNeedOwner:
{
TreeGetFirstEx(TreeMain);
}
cmTreeNodeType:
{
if TreeIsTerminal(TreeMain) then TreeSetNodeType(TreeMain, ntfText);
}
cmMarkUnMark:{
InvertMarker(Marker, Dogovor.nrec);
SetUnsetPick();
if(GetNext Dogovor <> tsok){}
RescanPanel(#dogovor);
}
cmSelectAll: MarkAll(true);
cmInvertAll: MarkAll(false);
cmUnselectAll: {
ClearMarker(Marker);
delete all pick;
RescanPanel(#dogovor);
}
end;
end;
browse brwSpec
show at(,16,,);
table spdocs;
fields
NameMCUSL 'Название' : [10], protect ;
katotped.name 'Ед. Изм' : [3] , protect ;
spdocs.kol 'Кол-во' : [5] , protect ;
spdocs.price 'Цена' : [8] , protect ;
spdocs.summa 'Стоимость' : [8] , protect ;
KolMCUSL 'Количество' : [3] , NoProtect;
// pick_mc.pickkol 'Количество' : [3] , noprotect;
// pick_usl.pickkol 'Количество' : [3] , noprotect;
end;
//------------------------------ Begin Initinterface ------------------------------
Procedure Initinterface;
{
delete all pick;
Marker := InitMarker('IfcSelDogovorMarker',8,1,1);
cfsSetCurrentContainer('brwSpec');
}
//------------------------------ End Initinterface --------------------------------
Handleevent
Cminit:{
Initinterface();
}
cmDone:{
DoneMarker(Marker, 'IfcSelDogovorMarker');
}
cmPositionChanged:{
if(CurTable = #spdocs){
SetUnsetPick();
}
message(KolMCUSL + ':' + CurTable);
// if(CurTable = #spdocs){
// tmpCount := KolMCUSL;
// }
}
cmCheckField:{
if(CurTable = #spdocs){
message(KolMCUSL + ':' + CurTable);
if(picked='') exit;
if(spdocs.prmc=1)
Update current pick_mc set pick_mc.pickkol = tmpCount;
else
Update current pick_usl set pick_usl.pickkol = tmpCount;
}
}
End;
End.
//------------------------------ End Interface IfcSelDogSpec------------------------------
Код: Выделить всё
#declare SetMyFont (pPicked)
{Font =
{
Color = if(#pPicked <> '', ColorSysBlue, 0 );
Bold = if(#pPicked <> '', true , false );
Italic = if(#pPicked <> '', true , false )
}
}
#end
const
#include fldcolor.inc
#include galnet.ccm
#include galnet.csc
end;
//----------------------begin Interface IfcSelDogSpec---------------------
Interface IfcSelDogSpec 'Выбор спецификаций' Cyan, doaccept;
Show At (1,1,60,20)
Create View Vmain
var
CurOwner : comp ;
Marker : longint;
Ind : longint;
tmpCount : double ;
As
Select
*,
if(spdocs.prmc = 1, katmc.name, katusl.name) (FieldName NameMCUSL),
if(spdocs.prmc = 1, pick_mc.pickkol, pick_usl.pickkol) (FieldName KolMCUSL),
if(SearchMarker(Marker,dogovor.nrec, Ind), 'V','')(FieldName=picked)
From
Dogovor,
dogovor spec_dovor,
spdocs,
pick pick_usl,
pick pick_mc
Where
((
CurOwner == dogovor.cdogovor
and dogovor.nrec == spdocs.cdoc
and dogovor.tidk == spdocs.tidk
and spdocs.cmcusl == katmc.nrec
and spdocs.cmcusl == katusl.nrec
and spdocs.cotped == katotped.nrec
and katmc.nrec == pick_mc.crec
and 8 == pick_mc.wlist
and katusl.nrec == pick_usl.crec
and 5 == pick_usl.wlist
)) order by dogovor.ddoc;
/*******************************************************************************
SetUnsetPick - 01/21/2008 1:54
********************************************************************************/
Procedure SetUnsetPick;
var c1: word; c2: comp
{
cfsSetProp('KolMCUSL','Skip', if(picked='', false, true));
_loop spdocs{
if(picked='')
if(spdocs.prmc = 1)
delete pick_mc where(( c2 == pick_mc.crec and 8 == pick_mc.wlist));
else
delete pick_usl where(( c2 == pick_usl.crec and 8 == pick_usl.wlist));
c2 := if(spdocs.prmc = 1, katmc.nrec, katusl.nrec);
if(c2 = comp(0)) exit;
if(spdocs.prmc = 1)
if(not isvalidall(#pick_mc))
insert into pick_mc set pick_mc.crec = c2, pick_mc.wlist = 8;
else
if(not isvalidall(#pick_usl))
insert into pick_usl set pick_usl.crec = c2, pick_usl.wlist = 5;
}
} //SetUnsetPick
//------------------------------ Begin MarkAll ------------------------------
procedure MarkAll(IsInsert: boolean);
{
StartNewVisual( vtRotateVisual, vfTimer, 'Пометить все',1);
PushPos(#Dogovor);
if ((Modifier GetFirst Dogovor) = tsOk){
do{
if(not IsInsert)
InvertMarker(Marker , Dogovor.nrec);
else InsertMarker(Marker, Dogovor.nrec);
SetUnsetPick();
NextVisual;
}while (Modifier GetNext Dogovor = tsOk)
}
PopPos(#Dogovor);
StopVisual('', 0);
RescanPanel(#Dogovor);
}
//------------------------------ End MarkAll ------------------------------
panel ptree
tree TreeMain(,,sci178InsPM)
show at(,,,15);
table Dogovor;
fields
picked 'V' : [3], NOAutoSize, #setMyFont(picked), skip;
Dogovor.ddoc 'Дата' : [8], protect, #setMyFont(picked);
Dogovor.descr 'Дескр' : [3], protect, #setMyFont(picked);
Dogovor.nodoc '№ Док' : [6], protect, #setMyFont(picked);
Dogovor.summa 'Сума' : protect;
end;
handleevent
cmTreeTop : {
curOwner := 0;
}
cmTreeDown : {
curOwner := vMain.Dogovor.nrec;
}
cmTreeUp:{
curOwner := vMain.dogovor.cdogovor;
}
cmTreeNeedOwner:
{
TreeGetFirstEx(TreeMain);
}
cmTreeNodeType:
{
if TreeIsTerminal(TreeMain) then TreeSetNodeType(TreeMain, ntfText);
}
cmMarkUnMark:{
InvertMarker(Marker, Dogovor.nrec);
SetUnsetPick();
if(GetNext Dogovor <> tsok){}
RescanPanel(#dogovor);
}
cmSelectAll: MarkAll(true);
cmInvertAll: MarkAll(false);
cmUnselectAll: {
ClearMarker(Marker);
delete all pick;
RescanPanel(#dogovor);
}
end;
end;
panel pSpec
browse brwSpec
show at(,16,,);
table spdocs;
fields
NameMCUSL 'Название' : [10], protect ;
katotped.name 'Ед. Изм' : [3] , protect ;
spdocs.kol 'Кол-во' : [5] , protect ;
spdocs.price 'Цена' : [8] , protect ;
spdocs.summa 'Стоимость' : [8] , protect ;
KolMCUSL 'Количество' : [3] , NoProtect;
// pick_mc.pickkol 'Количество' : [3] , noprotect;
// pick_usl.pickkol 'Количество' : [3] , noprotect;
end;
handleevent
cmCheckField:{
message(KolMCUSL);
if(picked='') exit;
if(spdocs.prmc=1)
Update current pick_mc;
else
Update current pick_usl;
}
cmPositionChanged:{
message(KolMCUSL);
}
end;
end;
//------------------------------ Begin Initinterface ------------------------------
Procedure Initinterface;
{
delete all pick;
Marker := InitMarker('IfcSelDogovorMarker',8,1,1);
cfsSetCurrentContainer('brwSpec');
}
//------------------------------ End Initinterface --------------------------------
Handleevent
Cminit:{
Initinterface();
}
cmDone:{
DoneMarker(Marker, 'IfcSelDogovorMarker');
}
cmPositionChanged:{
if(CurTable = #dogovor){
SetUnsetPick();
}
}
End;
End.
//------------------------------ End Interface IfcSelDogSpec------------------------------
-
- Заслуженный деятель интернет-сообщества
- Сообщения: 5188
- Зарегистрирован: 29 мар 2005, 17:49
- Откуда: SPB galaxy spb
мелочь какая то . а если тоже событие для panel ptree прописать? там тоже не пашет?. а cmAlways то пашет?
попробуйте еще это добавить
panel pnspdocs ;
table spdocs
HandleEvent
cmCheckField:
{ message('1')
}
end;
end;
вообще хоть одно событие пашет? а возможно дело в том, что вы константу cmCheckField объявили и сделали это неправильно или тянется она не из того реса.
попробуйте еще это добавить
panel pnspdocs ;
table spdocs
HandleEvent
cmCheckField:
{ message('1')
}
end;
end;
вообще хоть одно событие пашет? а возможно дело в том, что вы константу cmCheckField объявили и сделали это неправильно или тянется она не из того реса.
Код: Выделить всё
#statusline "statgal"
#declare SetMyFont (pPicked)
{Font =
{
Color = if(#pPicked <> '', ColorSysBlue, 0 );
Bold = if(#pPicked <> '', true , false );
Italic = if(#pPicked <> '', true , false )
}
}
#end
const
#include fldcolor.inc
#include galnet.ccm
#include galnet.csc
end;
//----------------------begin Interface IfcSelDogSpec---------------------
Interface IfcSelDogSpec 'Выбор спецификаций' Cyan, doaccept;
Show At (1,1,60,20)
Create View Vmain
var
CurOwner : comp ;
Marker : longint;
Ind : longint;
tmpCount : double ;
As
Select
*,
if(spdocs.prmc = 1, katmc.name, katusl.name) (FieldName NameMCUSL),
if(spdocs.prmc = 1, pick_mc.pickkol, pick_usl.pickkol) (FieldName KolMCUSL),
if(SearchMarker(Marker,dogovor.nrec, Ind), 'V','')(FieldName=picked)
From
Dogovor,
dogovor spec_dovor,
spdocs,
pick pick_usl,
pick pick_mc
Where
((
CurOwner == dogovor.cdogovor
and dogovor.nrec == spdocs.cdoc
and dogovor.tidk == spdocs.tidk
and spdocs.cmcusl == katmc.nrec
and spdocs.cmcusl == katusl.nrec
and spdocs.cotped == katotped.nrec
and katmc.nrec == pick_mc.crec
and 8 == pick_mc.wlist
and katusl.nrec == pick_usl.crec
and 5 == pick_usl.wlist
)) order by dogovor.ddoc;
/*******************************************************************************
SetUnsetPick - 01/21/2008 1:54
********************************************************************************/
Procedure SetUnsetPick;
var c1: word; c2: comp
{
cfsSetProp('KolMCUSL','Skip', if(picked='', false, true));
_loop spdocs{
if(picked='')
if(spdocs.prmc = 1)
delete pick_mc where(( c2 == pick_mc.crec and 8 == pick_mc.wlist));
else
delete pick_usl where(( c2 == pick_usl.crec and 8 == pick_usl.wlist));
c2 := if(spdocs.prmc = 1, katmc.nrec, katusl.nrec);
if(c2 = comp(0)) exit;
if(spdocs.prmc = 1)
if(not isvalidall(#pick_mc))
insert into pick_mc set pick_mc.crec = c2, pick_mc.wlist = 8;
else
if(not isvalidall(#pick_usl))
insert into pick_usl set pick_usl.crec = c2, pick_usl.wlist = 5;
}
} //SetUnsetPick
//------------------------------ Begin MarkAll ------------------------------
procedure MarkAll(IsInsert: boolean);
{
StartNewVisual( vtRotateVisual, vfTimer, 'Пометить все',1);
PushPos(#Dogovor);
if ((Modifier GetFirst Dogovor) = tsOk){
do{
if(not IsInsert)
InvertMarker(Marker , Dogovor.nrec);
else InsertMarker(Marker, Dogovor.nrec);
SetUnsetPick();
NextVisual;
}while (Modifier GetNext Dogovor = tsOk)
}
PopPos(#Dogovor);
StopVisual('', 0);
RescanPanel(#Dogovor);
}
//------------------------------ End MarkAll ------------------------------
panel ptree
tree TreeMain(,,sci178InsPM)
show at(,,,15);
table Dogovor;
fields
picked 'V' : [3], NOAutoSize, #setMyFont(picked), skip;
Dogovor.ddoc 'Дата' : [8], protect, #setMyFont(picked);
Dogovor.descr 'Дескр' : [3], protect, #setMyFont(picked);
Dogovor.nodoc '№ Док' : [6], protect, #setMyFont(picked);
Dogovor.summa 'Сума' : noprotect;
end;
handleevent
cmTreeTop : {
curOwner := 0;
}
cmTreeDown : {
curOwner := vMain.Dogovor.nrec;
}
cmTreeUp:{
curOwner := vMain.dogovor.cdogovor;
}
cmTreeNeedOwner:
{
TreeGetFirstEx(TreeMain);
}
cmTreeNodeType:
{
if TreeIsTerminal(TreeMain) then TreeSetNodeType(TreeMain, ntfText);
}
cmMarkUnMark:{
InvertMarker(Marker, Dogovor.nrec);
SetUnsetPick();
if(GetNext Dogovor <> tsok){}
RescanPanel(#dogovor);
}
cmSelectAll: MarkAll(true);
cmInvertAll: MarkAll(false);
cmUnselectAll: {
ClearMarker(Marker);
delete all pick;
RescanPanel(#dogovor);
}
end;
end;
panel pSpec
browse brwSpec(,,sci178InsPM)
show at(,16,,);
table spdocs;
fields
NameMCUSL 'Название' : [10], protect ;
katotped.name 'Ед. Изм' : [3] , protect ;
spdocs.kol 'Кол-во' : [5] , protect ;
spdocs.price 'Цена' : [8] , protect ;
spdocs.summa 'Стоимость' : [8] , protect ;
spdocs.kol 'Количество' : [8] , noprotect ;
// KolMCUSL 'Количество' : [3] , NoProtect;
// pick_mc.pickkol 'Количество' : [3] , noprotect;
// pick_usl.pickkol 'Количество' : [3] , noprotect;
end;
handleevent
cmCheckField:{
message(1);
if(picked='') exit;
if(spdocs.prmc=1)
Update current pick_mc;
else
Update current pick_usl;
}
cmPositionChanged:{
message(1);
}
end;
end;
//------------------------------ Begin Initinterface ------------------------------
Procedure Initinterface;
{
delete all pick;
Marker := InitMarker('IfcSelDogovorMarker',8,1,1);
cfsSetCurrentContainer('brwSpec');
}
//------------------------------ End Initinterface --------------------------------
Handleevent
Cminit:{
Initinterface();
}
cmDone:{
DoneMarker(Marker, 'IfcSelDogovorMarker');
}
cmPositionChanged:{
if(CurTable = #dogovor){
SetUnsetPick();
}
}
End;
End.
//------------------------------ End Interface IfcSelDogSpec------------------------------