Arsip: [ask]menampilkan table kategori kedalam treeview??

more 16 years ago
gedoyman
para master,
cara bikin menu categories pada gambar dibawah ini gimana sih
http://i140.photobucket.com/albums/r34/gedoyman/tree.gif
menu categories tersebut diambil dari tabel categories. Trus kalo diklik salah satu category bakal otomatis tampilin materialnya.
plis, udah coba2 masih kagak ngarti

more 16 years ago
zieborg
pake treeview bisas bisa, cuma codingnya panjang, paling gampang pake komponen tambahan aja.
yang free dapat di ambil di http://table-report.com/downloads/dbtreeview.zip

more 16 years ago
mas_kofa
//code of delphi
type
TPPROCESSNODE = ^TPROCESSNODE;
TPROCESSNODE = record
ID : Integer;
NAME : string;
NODETYPE : string;
MACTYPE : Integer;
PARENT : Integer;
EXPRESSION : string;
PREVPROC : Integer;
PARTOF : Integer;
TIMEVARVAL : Real;
COLOR : TColor;
USED : byte;
end;
ibq := NewQuery;
ibq.SQL.Text := 'select * from PROCESSNODE order by Parent, id';
ibq.Open;
New(PN);
PN^.ID := 0;
PN^.NAME := 'Process List';
PN^.NODETYPE := 'Root';
PN^.PREVPROC := -1;
DT := TVProcList.Items.Add(nil,'Process List');
DT.Data := PN;
cmBoxPrevProc.Items.Add('Begin Process');
PrevProc_List.Add('-1');
while not ibq.Eof do
begin
New(PN);
PN^.ID := FieldToInt(ibq,'id');
PN^.NAME := FieldToStr(ibq,'Name');
PN^.NODETYPE := FieldToStr(ibq,'NodeType');
PN^.MACTYPE := FieldToInt(ibq,'MACTYPE');
PN^.PREVPROC := FieldToInt(ibq,'PREVPROC');
PN^.EXPRESSION := FieldToStr(ibq,'EXPRESSION');
PN^.PARTOF := FieldToInt(ibq,'PARTOF');
PN^.USED := FieldToInt(ibq,'USED');
PN^.TIMEVARVAL := FieldToFloat(ibq,'TIMEVARVAL');
PN^.COLOR := FieldToInt(ibq,'COLOR');
PN^.PARENT := FieldToInt(ibq,'parent');
Parent := PN^.PARENT;
ParentDT := GetNodeParent(Parent);
DT := TVProcList.Items.AddChild(ParentDT,ibq['name']);
DT.Data := PN;
TVProcList.SetChecked(DT, PN^.USED = 1);
if ibq['NodeType'] = 'Process' then
begin
cmBoxPrevProc.Items.Add(ibq['Name']);
PrevProc_List.Add(IntToStr(PN.ID));
end;
ibq.Next;
end;
ibq.Free;
//tabel
CREATE TABLE "PROCESSNODE"
(
"ID" INTEGER NOT NULL,
"NAME" VARCHAR(30),
"NODETYPE" VARCHAR(15),
"MACTYPE" INTEGER,
"PARENT" INTEGER,
"PREVPROC" INTEGER,
"EXPRESSION" VARCHAR(200),
"PARTOF" INTEGER,
"TIMEVARVAL" DOUBLE PRECISION,
"COLOR" INTEGER,
"USED" INTEGER,
CONSTRAINT "PK_PROCESSNODE" PRIMARY KEY ("ID")
);
screenshot

more ...
- Pages:
- 1
reply |
Report Obsolete
AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now:
https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 5 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- Input data faktur
by onsir in Hal umum tentang Pascal Indonesia more 17 years ago - ajari ya caranya tipe data delphi+ms access
by pits_its in Tutorial & Community Project more 18 years ago - kesulitan simpan data ke 2 table sekaligus
by putukaca in Hal umum tentang Pascal Indonesia more 19 years ago - [HINT] Trigger dan Store Procedure In mySQL.
by cyber_hecker in MySQL more 17 years ago - Find field
by saysansay in Paradox more 19 years ago - Simulator
by lunaromance in Tutorial & Community Project more 15 years ago - Langkah buat program Hotel
by reminder2k1 in Tip n Trik Pemrograman more 17 years ago - cari component
by alfian in Enginering more 19 years ago - Nanya : Nge-print dengan QuickReport
by tox2wow in Reporting more 19 years ago - parsing sms gateway
by muhamad in Hal umum tentang Pascal Indonesia more 17 years ago