From 09fe6aecaf3a922b4c2c6c961e9cec2214b1c1ec Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 12 Jan 2011 16:56:24 +0200 Subject: UI Designer widget position fix This changes is to keep the UI Designer on par with what has changed in the core framework regarding widget positioning. We now need to call UpdateWindowPosition to correct the internal state of widgets, as they are loaded. Also removed unused/commented code. --- uidesigner/vfdformparser.pas | 73 +------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) (limited to 'uidesigner') diff --git a/uidesigner/vfdformparser.pas b/uidesigner/vfdformparser.pas index 693107e0..45306ac5 100644 --- a/uidesigner/vfdformparser.pas +++ b/uidesigner/vfdformparser.pas @@ -436,47 +436,6 @@ begin if lok then wg.Name := sval; end - { - else if ident = 'TEXT' then - begin - lok := CheckSymbol(s, ':='); - if lok then - begin - sval := GetStringValue(s); - lok := CheckSymbol(s, ';'); - end; - if lok then - begin - if wg is TwgLabel then TwgLabel(wg).Text := sval - else if wg is TwgEdit then TwgEdit(wg).Text := sval - else if wg is TwgButton then TwgButton(wg).Text := sval - else if wg is TwgCheckBox then TwgCheckBox(wg).Text := sval - else - lok := false; - end; - if lok then SetWidgetText(wg, sval); - end - else if (ident = 'LINES') or (ident = 'ITEMS') then - begin - lok := CheckSymbol(s, '.'); - lok := lok and (UpperCase(GetIdentifier(s)) = 'ADD'); - lok := lok and CheckSymbol(s, '('); - if lok then - begin - sval := GetStringValue(s); - lok := lok and CheckSymbol(s, ')'); - lok := lok and CheckSymbol(s, ';'); - end; - if lok then - begin - if wg is TwgMemo then TwgMemo(wg).Lines.Add(sval) - else if wg is TwgChoiceList then TwgChoiceList(wg).Items.Add(sval) - else if wg is TwgTextListBox then TwgTextListBox(wg).Items.Add(sval) - else - lok := false; - end; - end -} else if ident = 'ANCHORS' then begin lok := CheckSymbol(s, ':='); @@ -533,40 +492,10 @@ begin wg.Height := GetIntValue(s); lok := lok and CheckSymbol(s, ')'); lok := lok and CheckSymbol(s, ';'); + wg.UpdateWindowPosition; //if lok then Writeln('sd ok.'); //writeln('WT: ',sval); - end - { - else if (wg is TwgDBGrid) and (ident = 'ADDCOLUMN8') then - begin - c := TDBColumn.Create; - lok := CheckSymbol(s, '('); - - if lok then c.Title := u8(GetStringValue(s)); - lok := lok and CheckSymbol(s, ','); - if lok then c.FieldName8 := GetStringValue(s); - lok := lok and CheckSymbol(s, ','); - if lok then c.Width := GetIntValue(s); - lok := lok and CheckSymbol(s, ','); - if lok then - begin - sval := UpperCase(GetIdentifier(s)); - if sval = 'ALRIGHT' then c.Alignment := alRight - else if sval = 'ALCENTER' then c.Alignment := alCenter - else c.Alignment := alLeft; - end; - - lok := lok and CheckSymbol(s, ')'); - lok := lok and CheckSymbol(s, ';'); - - if lok then - begin - TwgDBGrid(wg).AddColumn(c.Title, c.FieldName8, c.Width, c.Alignment) - end; - - c.Free; end; -}; if not lok then if wgc <> nil then -- cgit v1.2.3-70-g09d2