2024-06-21
This commit is contained in:
62
Writerside/topics/GUI.md
Normal file
62
Writerside/topics/GUI.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# GUI - Tk
|
||||
|
||||
```bash
|
||||
sudo apt install perl-tk
|
||||
```
|
||||
|
||||
```perl
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use utf8;
|
||||
use Tk;
|
||||
|
||||
my $mw = MainWindow->new;
|
||||
$mw->Label(-text => '안녕!')->pack;
|
||||
$mw->Button(
|
||||
-text => '종료',
|
||||
-command => sub { exit },
|
||||
)->pack;
|
||||
MainLoop;
|
||||
```
|
||||
|
||||
https://metacpan.org/pod/distribution/Tk/pod/UserGuide.pod
|
||||
|
||||
## Layouts
|
||||
|
||||
### pack
|
||||
|
||||
### grid
|
||||
|
||||
### place
|
||||
|
||||
## Widgets
|
||||
|
||||
### Button
|
||||
|
||||
### Checkbutton
|
||||
|
||||
### Radiobutton
|
||||
|
||||
### Label
|
||||
|
||||
### Entry
|
||||
|
||||
### Scrollbar
|
||||
|
||||
### Listbox
|
||||
|
||||
### Text
|
||||
|
||||
### Canvas
|
||||
|
||||
### Scale
|
||||
|
||||
### Menubutton
|
||||
|
||||
### Menu
|
||||
|
||||
### Optionmenu
|
||||
|
||||
### Frame
|
||||
|
||||
### Toplevel
|
||||
Reference in New Issue
Block a user