From 0cf2aa929933217534463d676ccae614eb0c2889 Mon Sep 17 00:00:00 2001 From: fredvs Date: Thu, 14 Jan 2016 00:42:02 +0100 Subject: [PATCH] Fixed hint for forms. Version 1.9.1. --- src/designer_ext.prj | 237 ++++++-------------------------------- src/frm_main_designer.pas | 12 +- src/vfd_designer.pas | 6 +- src/vfd_formparser.pas | 5 +- src/vfd_main.pas | 12 +- 5 files changed, 57 insertions(+), 215 deletions(-) diff --git a/src/designer_ext.prj b/src/designer_ext.prj index a7a82b9..befd7d1 100644 --- a/src/designer_ext.prj +++ b/src/designer_ext.prj @@ -50,22 +50,22 @@ findinfiledialog=48 filefilterindex=0 filefilter="*.pas" "*.pp" "*.inc" [findinfileadialogfo.findtext] - value=virtualpanel.top + value=1.9 history=10 - virtualpanel.top - lstProps.Height - lstProps.Height := - virtualpanel.Height := - cbWindowPosition.top := - cbWindowPosition := - cbWindowPosition - ident - hint := + 1.9 + designer_ext v + => + virtualpanel.Height + virtualpanel.height := + virtualpanel.tag + while x < TDesignedForm + // hint hin= + virtualpanel.top [findinfileadialogfo] stackedunder= - x=715 - y=194 + x=914 + y=195 cx=375 cy=276 finddialog=8 @@ -493,6 +493,7 @@ showgrid=1 snaptogrid=1 moveonfirstclick=1 noformdesignerdocking=0 +componenthints=1 gridsizex=8 gridsizey=8 autoindent=1 @@ -742,8 +743,9 @@ envvarons=0 [edit] hintwidth=462 hintheight=38 -finddtext=windowposit +finddtext=panel.h findhistory=10 + panel.h windowposit virtualpanel.Height := virtualpanel.Height @@ -753,33 +755,8 @@ findhistory=10 hint := name := cbenabled - position findoptions=1 -editpos=38 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 +editpos=11 0,-1073741823 0,-1073741823 0,-1073741823 @@ -787,13 +764,10 @@ editpos=38 0,-1073741823 0,-1073741823 0,-1073741823 + 0,254 0,-1073741823 0,-1073741823 - 0,-1073741823 - 15,1243 - 0,-1073741823 - 0,-1073741823 - 0,-1073741823 + 0,0 bookmarks0=0 bookmarks1=0 bookmarks2=0 @@ -805,35 +779,7 @@ bookmarks7=0 bookmarks8=0 bookmarks9=0 bookmarks10=0 -bookmarks11=0 -bookmarks12=0 -bookmarks13=0 -bookmarks14=0 -bookmarks15=0 -bookmarks16=0 -bookmarks17=0 -bookmarks18=0 -bookmarks19=0 -bookmarks20=0 -bookmarks21=0 -bookmarks22=0 -bookmarks23=0 -bookmarks24=0 -bookmarks25=0 -bookmarks26=0 -bookmarks27=0 -bookmarks28=0 -bookmarks29=0 -bookmarks30=0 -bookmarks31=0 -bookmarks32=0 -bookmarks33=0 -bookmarks34=0 -bookmarks35=0 -bookmarks36=0 -bookmarks37=0 -sourcefiles=38 - ${PROJECTDIR}/frm_main_designer.pas +sourcefiles=11 ${PROJECTDIR}/frm_vfdforms.pas ${PROJECTDIR}/vfd_editors.pas ${PROJECTDIR}/vfd_widgets.pas @@ -841,38 +787,11 @@ sourcefiles=38 ${PROJECTDIR}/vfd_formparser.pas ${PROJECTDIR}/vfd_resizer.pas ${PROJECTDIR}/vfd_main.pas - ${PROJECTDIR}/define.inc - ${PROJECTDIR}/define.inc - ${PROJECTDIR}/frm_vfdforms.pas + ${PROJECTDIR}/frm_main_designer.pas ${PROJECTDIR}/vfd_designer.pas - /home/fred/fpgui/src/gui/fpg_panel.pas ${PROJECTDIR}/vfd_main.pas ${PROJECTDIR}/define.inc - ${PROJECTDIR}/vfd_widgets.pas - ${PROJECTDIR}/vfd_widgetclass.pas - ${PROJECTDIR}/vfd_designer.pas - ${PROJECTDIR}/frm_main_designer.pas - ${PROJECTDIR}/vfd_main.pas - ${PROJECTDIR}/vfd_designer.pas - ${PROJECTDIR}/fpg_style_anim_round_silver_horz.pas - ${PROJECTDIR}/vfd_widgets.pas - ${PROJECTDIR}/vfd_formparser.pas - ${PROJECTDIR}/frm_main_designer.pas - ${PROJECTDIR}/vfd_formparser.pas - ${PROJECTDIR}/vfd_designer.pas - ${PROJECTDIR}/vfd_file.pas - ${PROJECTDIR}/vfd_props.pas - ${PROJECTDIR}/vfd_designer.pas - ${PROJECTDIR}/vfd_designer.pas - ${PROJECTDIR}/vfd_widgets.pas - ${PROJECTDIR}/vfd_designer.pas - ${PROJECTDIR}/frm_main_designer.pas - ${PROJECTDIR}/vfd_designer.pas - ${PROJECTDIR}/vfd_designer.pas - /home/fred/fpgui/src/corelib/fpg_base.pas - ${PROJECTDIR}/frm_main_designer.pas -relpaths=38 - frm_main_designer.pas +relpaths=11 frm_vfdforms.pas vfd_editors.pas vfd_widgets.pas @@ -880,64 +799,11 @@ relpaths=38 vfd_formparser.pas vfd_resizer.pas vfd_main.pas - define.inc - define.inc - frm_vfdforms.pas + frm_main_designer.pas vfd_designer.pas - fpgui/src/gui/fpg_panel.pas vfd_main.pas define.inc - vfd_widgets.pas - vfd_widgetclass.pas - vfd_designer.pas - frm_main_designer.pas - vfd_main.pas - vfd_designer.pas - fpg_style_anim_round_silver_horz.pas - vfd_widgets.pas - vfd_formparser.pas - frm_main_designer.pas - vfd_formparser.pas - vfd_designer.pas - vfd_file.pas - vfd_props.pas - vfd_designer.pas - vfd_designer.pas - vfd_widgets.pas - vfd_designer.pas - frm_main_designer.pas - vfd_designer.pas - vfd_designer.pas - fpgui/src/corelib/fpg_base.pas - frm_main_designer.pas -ismoduletexts=38 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 +ismoduletexts=11 0 0 0 @@ -954,9 +820,7 @@ moduleoptions=0 visiblemodules=0 nomenumodules=0 [sourcefo.files_tab] -order=38 - 34 - 37 +order=11 0 1 2 @@ -965,45 +829,20 @@ order=38 5 6 7 - 8 9 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 32 - 33 - 36 - 35 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 + 8 tabsize=60 -firsttab=0 -index=0 +firsttab=5 +index=7 [layout] windowlayout=499 [mainfo.basedock] splitdir=2 - useroptions=15488 + useroptions=1879063680 [mainfo] splitdir=0 - useroptions=33554555 + useroptions=1912733819 stackedunder= parent= mdistate=0 @@ -1104,17 +943,17 @@ windowlayout=499 visible=0 [findinfilefo] splitdir=0 - useroptions=268451947 - stackedunder= + useroptions=268517483 + stackedunder=mainfo parent= mdistate=0 nx=0 ny=0 ncx=0 ncy=0 - x=277 - y=354 - cx=911 + x=161 + y=175 + cx=1084 cy=414 rcx=0 rcy=0 @@ -1142,7 +981,7 @@ windowlayout=499 sortdescend1=0 sorted=0 col=0 - row=7 + row=2 rowheight=17 [stackfo] splitdir=0 @@ -1431,7 +1270,7 @@ windowlayout=499 activetab=0 [debuggerfo] splitdir=0 - useroptions=24683 + useroptions=1879072875 parent=mainfo.basedock visible=1 mdistate=0 @@ -1447,7 +1286,7 @@ windowlayout=499 rcy=0 [sourcefo] splitdir=0 - useroptions=16489 + useroptions=1879064681 parent=mainfo.panel1.container visible=1 mdistate=0 @@ -1483,7 +1322,7 @@ windowlayout=499 visible=0 [mainfo.panel1] splitdir=1 - useroptions=838958571 + useroptions=1375829483 parent=mainfo.basedock visible=1 mdistate=0 diff --git a/src/frm_main_designer.pas b/src/frm_main_designer.pas index 43d3b01..120d6ff 100644 --- a/src/frm_main_designer.pas +++ b/src/frm_main_designer.pas @@ -252,7 +252,7 @@ TfrmAbout = class(TfpgForm) {@VFD_NEWFORM_DECL} const - ext_version: string = '1.9'; + ext_version: string = '1.9.1'; var @@ -2216,7 +2216,7 @@ procedure TfrmProperties.frmPropertiesPaint(Sender: TObject); edName.UpdateWindowPosition; {$endif} - if virtualpanel.Height < 70 then + if virtualpanel.tag = 1 then begin frmproperties.lstProps.Height := frmproperties.Height - 294; frmproperties.virtualpanel.top := @@ -2264,7 +2264,7 @@ procedure TfrmProperties.Vpanelpaint(Sender: TObject); virtualpanel.Canvas.SetColor(clblack); virtualpanel.Canvas.DrawText(4, 2, 60, 20, 'Visible'); - // if virtualpanel.Height > 68 then + // if virtualpanel.tag = 0 then // virtualpanel.Canvas.DrawText((virtualpanel.Width div 2) + 4, 2, 60, 20, 'Enabled') else virtualpanel.Canvas.DrawText((virtualpanel.Width div 2) + 4, 2, 60, 20, 'ShowHint') ; @@ -2277,12 +2277,12 @@ procedure TfrmProperties.Vpanelpaint(Sender: TObject); y := 22*z; virtualpanel.Canvas.DrawText(4, 2 + y, 60, 20, 'Focusable'); - if virtualpanel.Height > 70 then + if virtualpanel.tag = 0 then virtualpanel.Canvas.DrawText((virtualpanel.Width div 2) + 4, 2 + y, 60, 20, 'Tag') else virtualpanel.Canvas.DrawText((virtualpanel.Width div 2) + 35, 2 + y, 60, 20, 'Tag'); -if virtualpanel.Height > 70 then +if virtualpanel.tag = 0 then begin inc(z); y := 22*z; @@ -2350,7 +2350,7 @@ procedure TfrmProperties.Vpanelpaint(Sender: TObject); edtag.Width := (virtualpanel.Width div 4) - 1; edtag.visible := true; -if virtualpanel.Height > 70 then +if virtualpanel.tag = 0 then begin inc(z); y := 22*z; diff --git a/src/vfd_designer.pas b/src/vfd_designer.pas index b313a09..87c6c4a 100644 --- a/src/vfd_designer.pas +++ b/src/vfd_designer.pas @@ -1218,6 +1218,7 @@ procedure TFormDesigner.UpdateVirtualPropWin(TheWidget: TfpgWidget); end; // Hint + i := 0; ok := False; while i < TDesignedForm(TheWidget).Virtualprop.Count do begin @@ -1243,7 +1244,7 @@ procedure TFormDesigner.UpdateVirtualPropWin(TheWidget: TfpgWidget); frmproperties.virtualpanel.top := frmproperties.lstProps.Height + frmproperties.lstProps.top - 4; frmproperties.virtualpanel.Height := 154 ; - + frmproperties.virtualpanel.tag := 0 ; {$ifdef fpgui-develop} frmproperties.virtualpanel.UpdatePosition; @@ -1394,6 +1395,9 @@ procedure TFormDesigner.UpdateVirtualPropWin(TheWidget: TfpgWidget); frmproperties.virtualpanel.top := frmproperties.lstProps.Height + frmproperties.lstProps.top +1; frmproperties.virtualpanel.Height := 66; + frmproperties.virtualpanel.tag := 1 ; + + {$ifdef fpgui-develop} frmproperties.virtualpanel.UpdatePosition; frmproperties.lstProps.UpdatePosition; diff --git a/src/vfd_formparser.pas b/src/vfd_formparser.pas index 036ef4e..9c9c208 100644 --- a/src/vfd_formparser.pas +++ b/src/vfd_formparser.pas @@ -745,7 +745,7 @@ function TVFDFormParser.ReadWGVirtualProperty(s: String; s2: String; ident: Str end; if result then begin - TDesignedForm(wg).Virtualprop.Add(TDesignedForm(wg).Name + '.' + 'hin=' + stemp); /// + TDesignedForm(wg).Virtualprop.Add(TDesignedForm(wg).Name + '.' + 'hin=' + stemp); /// frmProperties.edhint.Text := stemp ; end; end else ///// other widget @@ -753,8 +753,7 @@ function TVFDFormParser.ReadWGVirtualProperty(s: String; s2: String; ident: Str result := CheckSymbol(s, ':='); if result then begin - // ival := GetIntValue(s); - stemp := GetStringValue(s); + stemp := GetStringValue(s); result := CheckSymbol(s, ';'); end; if result then begin diff --git a/src/vfd_main.pas b/src/vfd_main.pas index ec80669..5f72e19 100644 --- a/src/vfd_main.pas +++ b/src/vfd_main.pas @@ -578,7 +578,7 @@ procedure TMainDesigner.OnLoadFile(Sender: TObject); if not fpgFileExists(fname) then begin FFileLoaded := ''; - frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit => file does not exist'; + frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit File does not exist...'; // if frmMainDesigner.btnToFront.Tag = 1 then frmMainDesigner.MainMenu.MenuItem(8).Text := ' => file does not exist'; @@ -607,7 +607,7 @@ procedure TMainDesigner.OnLoadFile(Sender: TObject); if FFile.LoadFile(fname) = False then begin FFileLoaded := ''; - frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit => file does not load'; + frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit File does not load...'; // if frmMainDesigner.btnToFront.Tag = 1 then frmMainDesigner.MainMenu.MenuItem(8).Text := ' => file does not load'; @@ -635,7 +635,7 @@ procedure TMainDesigner.OnLoadFile(Sender: TObject); if FFile.GetBlocks = 0 then begin FFileLoaded := ''; - frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit => not a fpGUI form-file'; + frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit not a fpGUI form-file'; // if frmMainDesigner.btnToFront.Tag = 1 then frmMainDesigner.MainMenu.MenuItem(8).Text := ' => not a fpGUI form-file'; @@ -655,7 +655,7 @@ procedure TMainDesigner.OnLoadFile(Sender: TObject); end else begin - frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit => ' + fname; + frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit ' + fname; frmMainDesigner.MainMenu.MenuItem(8).Text := fname; ; frmMainDesigner.MainMenu.MenuItem(8).Visible := False; @@ -1335,13 +1335,13 @@ procedure TMainDesigner.OnSaveFile(Sender: TObject); isfilenew := false; - frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit => ' + fname; + frmMainDesigner.WindowTitle := 'fpGUI designer_ext v' + ext_version + ' ' + IntToStr(bitcpu) + ' bit ' + fname; // frmMainDesigner.MainMenu.MenuItem(8).Visible := False; // if (frmMainDesigner.btnToFront.Tag = 1) and (trim(fname) <> '') then // begin - frmMainDesigner.MainMenu.MenuItem(8).Text := ' => ' + fname; + frmMainDesigner.MainMenu.MenuItem(8).Text := ' ' + fname; // frmMainDesigner.MainMenu.MenuItem(8).Visible := True; // end;