SDBUIRadioButton: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
MoDementia (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
Radio button (UI element). | Radio button (UI element). | ||
===Example Code=== | |||
From a post by DiddeLeeDoo | |||
[[Image:Radiobuttons.png]] | |||
<source lang="vb"> | |||
Set SDB=CreateObject("SongsDB.SDBApplication") | |||
'Make a Form frame | |||
Set Frm=SDB.UI.NewForm | |||
Frm.Common.SetRect 0,0,220,160 | |||
'--------------------- | |||
'RADIO STATION 1 | |||
Set Pnl=SDB.UI.NewTranspPanel(Frm) | |||
Pnl.Common.SetRect 10,10,100,100 | |||
Pnl.Common.ControlName="RadioStation1" | |||
'RadioButtons for Station 1 | |||
Set Rad=SDB.UI.NewRadioButton(Pnl) | |||
Rad.Common.SetRect 10,10,60,20 | |||
Rad.Caption="Station 1" | |||
Rad.Checked=True | |||
Rad.Common.ControlName="R01" | |||
Set Rad=SDB.UI.NewRadioButton(Pnl) | |||
Rad.Common.SetRect 10,30,60,20 | |||
Rad.Caption="Station 2" | |||
Rad.Checked=False | |||
Rad.Common.ControlName="R02" | |||
Set Rad=SDB.UI.NewRadioButton(Pnl) | |||
Rad.Common.SetRect 10,50,60,20 | |||
Rad.Caption="Station 3" | |||
Rad.Checked=False | |||
Rad.Common.ControlName="R03" | |||
'------------- | |||
'RADIO STATION 2 | |||
Set Pnl=SDB.UI.NewTranspPanel(Frm) | |||
Pnl.Common.SetRect 110,10,100,100 | |||
Pnl.Common.ControlName="RadioStation2" | |||
'RadioButtons for Station 2 | |||
Set Rad=SDB.UI.NewRadioButton(Pnl) | |||
Rad.Common.SetRect 10,10,60,20 | |||
Rad.Caption="Station 1" | |||
Rad.Checked=True | |||
Rad.Common.ControlName="R01" | |||
Set Rad=SDB.UI.NewRadioButton(Pnl) | |||
Rad.Common.SetRect 10,30,60,20 | |||
Rad.Caption="Station 2" | |||
Rad.Checked=False | |||
Rad.Common.ControlName="R02" | |||
Set Rad=SDB.UI.NewRadioButton(Pnl) | |||
Rad.Common.SetRect 10,50,60,20 | |||
Rad.Caption="Station 3" | |||
Rad.Checked=False | |||
Rad.Common.ControlName="R03" | |||
'Show form | |||
Frm.ShowModal | |||
'Read values from the form. | |||
If Frm.Common.ChildControl("RadioStation1").Common.ChildControl("R01").Checked Then Station1=1 | |||
If Frm.Common.ChildControl("RadioStation1").Common.ChildControl("R02").Checked Then Station1=2 | |||
If Frm.Common.ChildControl("RadioStation1").Common.ChildControl("R03").checked Then Station1=3 | |||
If Frm.Common.ChildControl("RadioStation2").Common.ChildControl("R01").Checked Then Station2=1 | |||
If Frm.Common.ChildControl("RadioStation2").Common.ChildControl("R02").Checked Then Station2=2 | |||
If Frm.Common.ChildControl("RadioStation2").Common.ChildControl("R03").checked Then Station2=3 | |||
'tell what you selected after closing the form | |||
MsgBox Station1 & vbLf & Station2 | |||
</source> | |||
=== ISDBUIRadioButton members === | === ISDBUIRadioButton members === | ||
Latest revision as of 07:23, 5 May 2008
- SDBAlbum
- SDBAlbumArtItem
- SDBAlbumArtList
- SDBAlbums
- SDBApplication
- SDBArtist
- SDBArtists
- SDBCommonDialog
- SDBDatabase
- SDBDBIterator
- SDBDevice
- SDBDeviceList
- SDBDropTarget
- SDBDropTargetLast
- SDBDropTargetNext
- SDBDropTargetRip
- SDBFileSystem
- SDBHWEvents
- SDBImage
- SDBIniFile
- SDBMedia
- SDBMenuItem
- SDBPlayer
- SDBPlaylist
- SDBPlaylists
- SDBProgress
- SDBRegistry
- SDBScriptControl
- SDBSongData
- SDBSongIterator
- SDBSongList
- SDBStringList
- SDBTextFile
- SDBTimer
- SDBTools
- SDBTrackSynchStatus
- SDBTracksWindow
- SDBTree
- SDBTreeNode
- SDBUI
- SDBUIActiveX
- SDBUIButton
- SDBUICheckBox
- SDBUICommon
- SDBUIDockablePanel
- SDBUIDropDown
- SDBUIEdit
- SDBUIForm
- SDBUIGroupBox
- SDBUILabel
- SDBUIListBox
- SDBUIMaskEdit
- SDBUIMultiLineEdit
- SDBUIPanel
- SDBUIRadioButton
- SDBUISpinEdit
- SDBUITrackBar
- SDBUITranspPanel
- SDBUITreeList
- SDBUITreeListItem
- SDBWebSearch
CoClass SDBUIRadioButton
Radio button (UI element).
Example Code
From a post by DiddeLeeDoo
Set SDB=CreateObject("SongsDB.SDBApplication")
'Make a Form frame
Set Frm=SDB.UI.NewForm
Frm.Common.SetRect 0,0,220,160
'---------------------
'RADIO STATION 1
Set Pnl=SDB.UI.NewTranspPanel(Frm)
Pnl.Common.SetRect 10,10,100,100
Pnl.Common.ControlName="RadioStation1"
'RadioButtons for Station 1
Set Rad=SDB.UI.NewRadioButton(Pnl)
Rad.Common.SetRect 10,10,60,20
Rad.Caption="Station 1"
Rad.Checked=True
Rad.Common.ControlName="R01"
Set Rad=SDB.UI.NewRadioButton(Pnl)
Rad.Common.SetRect 10,30,60,20
Rad.Caption="Station 2"
Rad.Checked=False
Rad.Common.ControlName="R02"
Set Rad=SDB.UI.NewRadioButton(Pnl)
Rad.Common.SetRect 10,50,60,20
Rad.Caption="Station 3"
Rad.Checked=False
Rad.Common.ControlName="R03"
'-------------
'RADIO STATION 2
Set Pnl=SDB.UI.NewTranspPanel(Frm)
Pnl.Common.SetRect 110,10,100,100
Pnl.Common.ControlName="RadioStation2"
'RadioButtons for Station 2
Set Rad=SDB.UI.NewRadioButton(Pnl)
Rad.Common.SetRect 10,10,60,20
Rad.Caption="Station 1"
Rad.Checked=True
Rad.Common.ControlName="R01"
Set Rad=SDB.UI.NewRadioButton(Pnl)
Rad.Common.SetRect 10,30,60,20
Rad.Caption="Station 2"
Rad.Checked=False
Rad.Common.ControlName="R02"
Set Rad=SDB.UI.NewRadioButton(Pnl)
Rad.Common.SetRect 10,50,60,20
Rad.Caption="Station 3"
Rad.Checked=False
Rad.Common.ControlName="R03"
'Show form
Frm.ShowModal
'Read values from the form.
If Frm.Common.ChildControl("RadioStation1").Common.ChildControl("R01").Checked Then Station1=1
If Frm.Common.ChildControl("RadioStation1").Common.ChildControl("R02").Checked Then Station1=2
If Frm.Common.ChildControl("RadioStation1").Common.ChildControl("R03").checked Then Station1=3
If Frm.Common.ChildControl("RadioStation2").Common.ChildControl("R01").Checked Then Station2=1
If Frm.Common.ChildControl("RadioStation2").Common.ChildControl("R02").Checked Then Station2=2
If Frm.Common.ChildControl("RadioStation2").Common.ChildControl("R03").checked Then Station2=3
'tell what you selected after closing the form
MsgBox Station1 & vbLf & Station2
ISDBUIRadioButton members
Name | Type | Description |
---|---|---|
Caption | Property Get/Let | |
Checked | Property Get/Let | |
Common | Property Get |