Hallo, ich speichere Informationen in einer Paradox DB über eine MySQL DB und will in einer ListBox OnDrawItem ein + Zeichen
hinmachen wo ein AutoInc ist! Nun mache ich das so
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30:
| HQ2.ParamByName('TYP').AsSmallInt := Ord(ZQuery.Fields[J].DataType); ... ... FieldType := TFieldType(HQ.FieldByName('TYP').AsInteger); ... ... procedure TVisualTable.OnFieldsDraw(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin if(Index <> -1)then begin with FVisualTable.Canvas do begin FillRect(Rect); if(IsFieldAutoInc(Index))then begin Font.Color := clRed; TextOut(Rect.Left+1,Rect.Top+1, '+'); end else if(IsFieldRequired(Index))then begin Font.Color := clRed; TextOut(Rect.Left+1, Rect.Top+1, '*'); end; Font.Color := clBlack; TextOut(Rect.Left+7, Rect.Top+1, FVisualTable.Items[Index]); end; end; end; |
Ich weiß jetzt nicht es könnte sein dass er dann ein Integer Typ präsentiert?
Also die Required Felder Zeigt er mit Rotem Sternchen an aber die AutoInc Felder nicht -> Integer?
//Edit
Hier ist die Lösung
www.delphi-forum.de/...45505&highlight=