Autor Beitrag
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mi 14.05.03 17:33 
Hallo Leute,

wir haben ein neues Feature in das Board eingebaut. Ab heute habt ihr die Möglichkeit Delphi/Pascal-Sourcecode in bestimmten Tags zu posten damit dieser dann "gehighlightet" wird.

Der neue Tag heißt [ delphi ] (Ohne Leerzeichen). Hier ein Beispiel:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
For I := 0 To ListBox1.Items.Count -1 Do
  // Prüfen
  If I = 2 Then
    ListBox2.Items.Add ('2. Zeile ' + ListBox1.Items [I])
  Else
    ListBox2.Items.Add (ListBox1.Items [I]);

Es ist zwar noch ein kleiner Fehler drin aber dieser wird morgen beseitigt.

Bitte in Zukunft diesen Tag für Delph/Pascal-Sourcecode benutzen. Viel Spaß damit!

Gruß
Tino

PS: Vielen Dank an tommie-lie für die Optimierung des Sourcecode-Highlighter!


Zuletzt bearbeitet von Tino am Do 05.06.03 17:16, insgesamt 4-mal bearbeitet
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mi 14.05.03 17:36 
coole Sache!
kenn ich zwar auch schon aus nem andrem Forum, aber die Sache ist echt cool...

übrigens, was mir grad auffällt: unten im "Thema-Überblick wird das ganze noch alt angezeigt..., ist aber eigentlich ja egal ;))
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mi 14.05.03 19:02 
An für sich gefällt mir die Neuigkeit gut, allerdings vermisse ich doch ein wenig die grüne Trennfarbe. So konnte man extrem schnell (mit einem Blick) unterscheiden ob es sich um ein Code oder um ein Zitat handelt. Jetzt haben Zitat und Codes die gleiche Farbe. Ist zwar keine Katastrophe, ein wenig mehr Unterschied wäre nicht schlecht.

_________________
Popov
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 14.05.03 19:30 
ja das was popov gemeint hat ist mir auch aufgefallen.

toll wäre es, wenn man selber bestimmen könnte, wie z.b. die strings eingefärbt werden, aber das würde zu weit führen !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mi 14.05.03 19:46 
Zitat:
toll wäre es, wenn man selber bestimmen könnte, wie z.b. die strings eingefärbt werden


Eine einheitliches Code Highlighting finde ich besser.
Sonst wird's zu bunt und unschön.
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mi 14.05.03 19:51 
Ich kann euch nicht ganz folgen...
Wieso sind Zitate und der Code in der gleichen Farbe? Zitate sind deutlich ausgegraut, während Bezeichner und Operanden schwarz sind.

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mi 14.05.03 19:54 
Die Rahmenfarbe von

Zitat:
Zitat


und

ausblenden Delphi-Quelltext
1:
Code					


ist gleich.
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Mi 14.05.03 19:55 
auf jeden Fall ne coole Neuerung ... und um den genannten Problem zu begegnen könnte man doch die Hintergrundfarbe von dem Code nen bissel dunkler oder heller machen?!

MfG BungeeBug
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 14.05.03 19:56 
Zitat:

Hello world.

ausblenden volle Höhe 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:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
var
  wc: TWndClassEx = (
    cbSize          : SizeOf(TWndClassEx);
    Style           : CS_HREDRAW or CS_VREDRAW;
    lpfnWndProc     : @WndProc;
    cbClsExtra      : 0;
    cbWndExtra      : 0;
    hbrBackground   : COLOR_APPWORKSPACE;
    lpszMenuName    : nil;
    lpszClassName   : ClassName;
    hIconSm         : 0;
  );
  msg: TMsg;
begin
  InitCommonControls;

  wc.hInstance  := hInstance;
  wc.hIcon      := LoadIcon(0, IDI_APPLICATION);
  wc.hCursor    := LoadCursor(0, IDC_ARROW);

  RegisterClassEx(wc);
  hwndMain := CreateWindowEx(0, ClassName, AppName, WS_CAPTION or WS_VISIBLE or
    WS_SYSMENU or WS_MINIMIZEBOX or WS_MAXIMIZEBOX or WS_SIZEBOX,
    Integer(CW_USEDEFAULT),Integer(CW_USEDEFAULT), WindowWidth, WindowHeight, 0,
    0, hInstance, nil);

  hAccelTbl := LoadAccelerators(hInstance, MAKEINTRESOURCE(100));

  while true do
  begin
    if not GetMessage(msg, 000then
      break;
    if TranslateAccelerator(hWndMain, hAccelTbl, msg) = 0 then
    if IsDialogMessage(hWndMain, msg) = FALSE then
    begin
      TranslateMessage(msg);
      DispatchMessage(msg);
    end;
  end;
  ExitCode := msg.wParam;
end.

Sie meinen den Unterscheid zwischen den quote-Tags und den code-Tags.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 14.05.03 19:57 
Hehe, letztens habe ich in der Delphi-Praxis noch geschrieben, dass ich die Sourcecode-Tags cool finde.
Und siehe da, sie werden hier eingeführt! Da soll noch mal einer sagen, Wünsche werden nicht wahr!

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mi 14.05.03 20:04 
Ach die Raaahmenfarbe. Sagt das doch gleich.
Stimmt, aber war die früher nicht auch schon grau? Da war nur der Text ein bisschen grüner. Mist, hab' schon wieder vergessen, wie's vorher aussah...

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Mi 14.05.03 20:58 
Wie wäre es, den Hintergrund der Delphi-Tags etwas grünlich zu machen? Das würde mehr nach Code aussehen.

Ansonsten: Cooles Tool!
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mi 14.05.03 21:51 
Da viele anscheinend ein kurzes Gedächtnis haben - früher war der Codetext grün.

Zitat:
procedure TForm1.Button1Click(Sender: TObject);
begin
//
end;

_________________
Popov
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Do 15.05.03 14:22 
Das Gründ trifft es nicht direkt...aber sehr knapp.
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Do 15.05.03 15:48 
Wenn dann richtig den Matrix Style .. Hingergrund Schwarz und Text Grün .. ist überringes sehr Augen freunglich :)

MfG BungeeBug

P.S.: Mein Delphi sieht auch so aus ...
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Do 15.05.03 16:06 
BungeeBug hat folgendes geschrieben:
Wenn dann richtig den Matrix Style .. Hingergrund Schwarz und Text Grün ..

Am besten noch ein automatischer Vertikalscroll. Wenn schon Matrix, dann richtig ;)

_________________
Popov
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Do 15.05.03 16:14 
hmm .. ich glaub nicht das mans dann noch richtig lesen kann ... aber is denn hier kein Matrix Fan der das kann und uns verraten kann wielange man braucht bis das geht?! :P

MfG BungeeBug
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Fr 16.05.03 15:00 
Mir ist noch aufgefallen, daß nicht nur die Farbe anders ist, sondern auch die Schrift. Vorher war die Code-Schrift ein wenig voller, war also auch ein wenig breiter. Man konnte die Schrift deshalb auch schneller lesen. Jetzt ist die Schrift ein wenig gequetschter. Ist aber eine Sache an die man sich gewöhnen wird. Allerdings ist mir das sofort aufgefallen, nur konnte ich nicht gleich zuordnen was es gewesen ist.

Ansonsten würde mich interresieren ob sich an der Schriftfarbe noch was ändert, oder ob es das gewesen ist. Eine kleine Unterscheidung zwischen Zitat und Code wäre schon gut.

_________________
Popov
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 16.05.03 16:05 
Die Schrift war nicht "voller", es war eine ganz andere. Früher war es Arial oder sowas, jetzt ist es Courier.
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Fr 16.05.03 16:33 
Nicht bei CODE. Bei Arial sind alle Buchstaben unterschiedlich breit. Bei Curier New sind alle Buchstaben gleich breit. Deshalb kann früher kein Arial benutzt worden sein. Allerdings ist Curier nicht die einzige Schrift, die bei allen Buchstaben die gleiche Breite hat.

_________________
Popov