Delphi XE2 之 FireMonkey 入門(24) – 資料繫結: TBindingsList: TBindExpression.Direction

在學習 BindingSource 屬性時, 可以讓兩個控制項互為繫結來源; TBindExpression 對應的功能是 Direction 屬性.先在表單上添加 Edit1、Edit2、BindingsList1; 然後啟用 Edit1、Edit2 和表單的預設事件.procedure TForm1.FormCreate(Sender: TObject);begin with TBindExpression.Create(BindingsList1) do begin

Delphi XE2 之 FireMonkey 入門(25) – 資料繫結: TBindingsList: 運算式的靈活性及運算式函數

綁定運算式中可以有簡單的運算和字串串連, 但字串需放在雙引號中.還可以使用 TBindingsList.Methods 提供的一組運算式函數(分別來自 System.Bindings.Methods 和 Data.Bind.EngExt

Delphi XE2 之 FireMonkey 入門(41) – 控制項基礎: TListBox

TScrollBox -> TCustomListBox -> TListBox; 其元素項是 TListBoxItem 類型.TListBox 的功能在 TCustomListBox 裡就完成了.值得注意的變化是: 1、複選框(相關屬性: ShowCheckboxes、TListBoxItem.IsChecked)2、交替背景(通過繼承還可以調整交替的背景色)3、TListBoxItem 可調整大小、容納其它對象.{ TCustomListBox }public

Delphi XE2 之 FireMonkey 入門(42) – 控制項基礎: TComboBox、TComboEdit

TListBox 有兩個兄弟 TComboListBox、TComboEditListBox; TComboBox、TComboEdit 雖不是不是從它們繼承, 但分別包含了它們, 所以使用起來都有點像 TListBox.TComboBox 更像 TListBox, 比 TComboEdit 多出了 Selected 等成員;TComboEdit 是從 TCustomEdit 繼承, 和 TEdit 是兄弟, 比 TComboBox 多出了 Text 等成員.

關于禁止程式重複啟動的另一種需要與實現

手頭的程式需要禁止重複啟動, 但需要保留新的、關閉舊的.我想還是從主視窗的類名下手吧; 寫了一個函數, 在 OnCreate 中調用即可:{ 函數 }procedure CloseSameClassNameWindow(ACurrentWindow: HWND; const AClassName: string);var h: HWND; buf: array[0..255] of Char;begin h := ACurrentWindow; while h > 0 do

Delphi XE2 之 FireMonkey 入門(43) – 控制項基礎: TStringGrid、TGrid

TStringGrid、TGrid 都是從 TCustomGrid 繼承; 區別有:1、它們的列對象分別是: TStringColumn、TColumn;2、TStringGrid 比 TGrid 多出了 Cells[] 屬性.因為 TGrid 沒有 Cells[] 屬性, 暫時不方便使用; 我嘗試取其當前單元值時竟然用了這樣的代碼:(Grid1.Columns[Grid1.ColumnIndex].CellControlByRow(Grid1.Selected) as

MusicXML 3.0 (1) – “Hello World” in MusicXML

這是 Midi 之後更完善的通用樂譜格式, 已有 Sibelius 等眾多軟體相容; 官方網站: http://www.musicxml.org/ 或 http://www.recordare.com/musicxml<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN"

Delphi XE2 之 FireMonkey 入門(44) – 控制項基礎: TTreeView、TTreeViewItem

TScrollBox -> TCustomTreeView -> TTreeView 子項類型是 TTreeViewItem.測試, 先在表單上放一個 TTreeView, 並需要它的 OnChange 事件:unit Unit1;interfaceuses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls,

MusicXML 3.0 (2) – 調號

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"><score-partwise version="3.0"> <part-list>

Delphi XE2 之 FireMonkey 入門(45) – 結題與問題

很喜歡 FMX 的一些新控制項, 如: TExpander、TArcDial、TComboTrackBar、TPathLabel 等等, 沒時間繼續學習了.對 FMX 的整體感覺: 還不成熟, 但肯定有前景; 它的構架師有遠見、了不起, 很難估計他開啟的是多大一扇門!本將繼續學習:1、TCanvas、TBrush、TApplication;2、FMX 中的 GDI+、D2D、DirectX;3、FMX 3D;4、XE2 中新增的其他內容(譬如新增的 TZipFile 類, 已測試過、下帖附上).

System.SysUtils.TMarshaller 與 System.TMarshal

TMarshaller(結構) 基於 TMarshal(是有一大堆的 class 方法組成的類) 實現.TMarshaller 可以對緩衝區進行自動(自動釋放)安全地管理, TMarshal 也有前者沒有的重要方法, 譬如: TMarshal.Copy() 方法.有了它們, 以後關於記憶體緩衝區, 字串轉碼等操作就更方便了.{測試}procedure TForm1.FormCreate(Sender: TObject);var M: TMarshaller; pw: TPtrWrapper;

MusicXML 3.0 – DTD 速查

%common;%layout;%identity;%attributes;%link;%note;%barline;%direction;%score;]]>%isolat1;%isolat2; ]]> ]]>

MusicXML 3.0 (26) – 隱藏對象

<?xml version="1.0" standalone="no"?><!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"><score-partwise version="3.0"> <part-list> <score-part

addedbytes.com 製作的速查表欣賞

適寬查看ASP/VBScriptCakePHP-1.2CSS-v1CSS-v2FrenchKings and QueensLinux Command LineNaNoWriMo 2011Six Noations 2012Vimeo Advanced API MethodsWikipediaHTML Character EntitiesHTMLJavaScriptMicroformatsMod Rewrite-v1Mod

System.TPtrWrapper – 指標封裝器

不知什麼時候 System 單元有了 TPtrWrapper 結構體, 它提供了非常小的一點功能: 指標(Pointer)與指標地址(NativeInt)的轉換.很顯然, 以前常用的 Integer(P) 或 Ptr(Number) 已經不適用與 64 位元了, 這時使用 TPtrWrapper 應該是更方便,更保險的選擇.發現在 Delphi 新的源碼中, 幾乎就把 TPtrWrapper 當做指標來使用了.{TPtrWrapper 全功能測試}procedure

曾經對 TMemoryStream.Memory 錯誤的理解

TMemoryStream 的 Position 變化後, 我曾經認為它的 Memory 屬性也會變化; 只怪不看源碼, 只想當然!procedure TForm1.FormCreate(Sender: TObject);var Stream1,Stream2: TMemoryStream; pw: TPtrWrapper;begin Stream1 := TStringStream.Create('1234567890'); Stream2 :=

一組檔案名稱(主要以數字命名), 我想按數字大小排序

uses System.IOUtils, System.Types, System.Generics.Collections, System.Generics.Defaults, System.Character;procedure StrArrNumberSort(var Arr: TArray<string>);begin TArray.Sort<string>(Arr, TComparer<string>.Construct(

使用泛型, 寫一個為任意類型的動態數組添加元素的方法

一、使用泛型類:unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end;

把一個”結構體”當做屬性後碰到的問題

當我把一個"結構體"在類中當做屬性後, 在實用中可以直接讀取結構體成員, 但不能直接寫入...下面是由此引發的小練習:unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;type TForm1 =

FireMonkey 繪圖(1)

FMX 的 Canvas 在不同的系統上會分別使用:WinVista、Win7: D2D (FMX.Canvas.D2D.pas)WinXP: GDI+ (FMX.Canvas.GDIP.pas)Mac 系列: Core Graphics (FMX.Canvas.Mac.pas)和 HTML5 中的 Canvas 非常類似, 現在的 Canvas 模糊了 Pen 的概念:之前的 Canvas.Pen 對應: Canvas.Stroke;之前的 Canvas.Brush 對應:

總頁數: 61357 1 .... 4821 4822 4823 4824 4825 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.