Source language: Translate to:

Radio Buttons & Article search

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Radio Buttons & Article search

Postby sheppard1 » Mon Jun 03, 2013 8:38 pm

Ok I have another issue, Heres how it should work, I choose radio button option it displays more options in combobox depending on radio button choice(each radio button gives Different options in combobox, But each radio button has the same set of names inserted into combobox. Which is the way i want it) But when i select the option from the combobox i cant get it to display an article dependent on both what radio button and which option is chosen.

*Concept*
So if i select radio button one, and then garage it shows Radio1.garage file
So if i select radio button two, and then garage it shows Radio2.garage file
but it should never show the file for Radio1.garage if radio2.garage is selected.

I have it working up to the choosing combobox option
Here is my current progress.

Also, can i implement a search article Function...like ctrl+f in article that is onscreen when app is run.

Code: Select all
    {NeoBook 5 Objects}
    NeoBookVer=5.80
    ObjectType=5
    Name=Rectangle6
    X=0
    Y=0
    W=264
    H=600
    Anchor=0
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=0
    FillPattern=3
    FillMode=Yes
    TabOrder=8
    ObjectType=4
    Name=Picture5
    X=0
    Y=0
    W=256
    H=288
    Anchor=0
    FileName=C:\Users\thomas bacon\Desktop\Prog images\AAuico.png
    PictStyle=0
    Resample=Yes
    LineColor=37104
    LineWidth=0
    LineStyle=0
    FillColor=0
    FillPattern=1
    FillMode=Yes
    TabOrder=1
    ObjectType=3
    Name=PushButton8
    X=0
    Y=0
    W=40
    H=24
    Anchor=0
    Text=back
    Align=2
    ImageStyle=0
    ObjAction=GotoPage "Fallen Earth Tools"
    LineColor=32984
    LineWidth=0
    LineStyle=6
    FillColor=0
    FillPattern=1
    FillMode=Yes
    Font=Space Bd BT
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=24792
    TabOrder=2
    ObjectType=10
    Name=ListBox1
    X=-232
    Y=112
    W=208
    H=328
    Anchor=0
    Text=[Embedded]s1garage.rtf¶
    VarName=[ListBox1]
    VarType=0
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=16777215
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=0
    TabOrder=9
    ObjectType=2
    Name=Article3
    X=264
    Y=0
    W=304
    H=600
    Anchor=0
    FileName=[File]
    ScrollBar=No
    WordWrap=No
    AllowCopy=Yes
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=0
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=16777215
    TabOrder=3
    ObjectType=13
    Name=RadioButton1
    X=24
    Y=280
    W=104
    H=32
    Anchor=0
    Text=Sector 1
    Align=1
    VarName=[RadioGroup3]
    InitState=0
    XPTheme=No
    ObjAction=If "[RadioGroup3]" "=" "Sector 1"¶    ListBoxDeleteItem "Combobox7" "All"¶    ListBoxAddItem "ComboBox7" "0" "Town Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Garage Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Lifenet Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Bunker Bar Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Tourist Telescope Coordinates"¶    EnableObject "ComboBox7"¶Endif
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=16777215
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=33023
    TabOrder=10
    ObjectType=11
    Name=ComboBox7
    X=8
    Y=440
    W=248
    H=28
    Anchor=0
    VarName=[ComboBox1]
    VarType=1
    XPTheme=Yes
    ObjAction=If "[RadioGroup3]" "=" "Sector 1"¶else¶If "[ComboBox1]" "=" "Town Coordinates"¶ListBoxGetItem "ListBox1" "[ComboBox1]" "[File]"¶Endif
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=16777215
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=0
    Enabled=No
    TabOrder=4
    ObjectType=13
    Name=RadioButton4
    X=24
    Y=352
    W=72
    H=32
    Anchor=0
    Text=Deadfall
    Align=1
    VarName=[RadioGroup3]
    InitState=0
    XPTheme=No
    ObjAction=If "[RadioGroup3]" "=" "Deadfall"¶    ListBoxAddItem "ComboBox7" "0" "Town Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Garage Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Lifenet Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Bunker Bar Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Tourist Telescope Coordinates"¶    EnableObject "ComboBox7"¶Endif
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=16777215
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=33023
    TabOrder=13
    ObjectType=13
    Name=RadioButton5
    X=24
    Y=376
    W=120
    H=32
    Anchor=0
    Text=Terminal Woods
    Align=1
    VarName=[RadioGroup3]
    InitState=0
    XPTheme=No
    ObjAction=If "[RadioGroup3]" "=" "Terminal Woods"¶    ListBoxAddItem "ComboBox7" "0" "Town Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Garage Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Lifenet Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Bunker Bar Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Tourist Telescope Coordinates"¶    EnableObject "ComboBox7"¶Endif
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=16777215
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=33023
    TabOrder=14
    ObjectType=13
    Name=RadioButton6
    X=24
    Y=400
    W=120
    H=32
    Anchor=0
    Text=Alpha County
    Align=1
    VarName=[RadioGroup3]
    InitState=0
    XPTheme=No
    ObjAction=If "[RadioGroup3]" "=" "Alpha County"¶    ListBoxAddItem "ComboBox7" "0" "Town Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Garage Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Lifenet Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Bunker Bar Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Tourist Telescope Coordinates"¶    EnableObject "ComboBox7"¶Endif
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=16777215
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=33023
    TabOrder=5
    ObjectType=13
    Name=RadioButton2
    X=24
    Y=304
    W=104
    H=32
    Anchor=0
    Text=Sector 2
    Align=1
    VarName=[RadioGroup3]
    InitState=0
    XPTheme=No
    ObjAction=If "[RadioGroup3]" "=" "Sector 2"¶    ListBoxDeleteItem "Combobox7" "All"¶    ListBoxAddItem "ComboBox7" "0" "Town Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Garage Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Lifenet Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Bunker Bar Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Tourist Telescope Coordinates"¶    EnableObject "ComboBox7"¶Endif
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=16777215
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=33023
    TabOrder=11
    ObjectType=13
    Name=RadioButton3
    X=24
    Y=328
    W=104
    H=32
    Anchor=0
    Text=Sector 3
    Align=1
    VarName=[RadioGroup3]
    InitState=0
    XPTheme=No
    ObjAction=If "[RadioGroup3]" "=" "Sector 3"¶    ListBoxAddItem "ComboBox7" "0" "Town Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Garage Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Lifenet Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Bunker Bar Coordinates"¶    ListBoxAddItem "ComboBox7" "0" "Tourist Telescope Coordinates"¶    EnableObject "ComboBox7"¶Endif
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=16777215
    FillPattern=3
    FillMode=Yes
    Font=Arial
    FontSize=10
    FontStyle=0
    FontCharset=1
    TextColor=33023
    TabOrder=7
    ObjectType=5
    Name=Rectangle11
    X=568
    Y=0
    W=232
    H=600
    Anchor=0
    LineColor=37104
    LineWidth=2
    LineStyle=0
    FillColor=0
    FillPattern=3
    FillMode=Yes
    TabOrder=12
sheppard1
 
Posts: 25
Joined: Thu May 30, 2013 4:37 pm

Re: Radio Buttons & Article search

Postby dpayer » Tue Jun 04, 2013 6:35 am

sheppard1 wrote:i cant get it to display an article dependent on both what radio button and which option is chosen.


The selection of the radio button can also be used to set a variable.

The selectionchange of the combobox can have a series of conditional statements
Code: Select all
If "[radiogroup3]" "=" "Sector 3"
    If "[combobox1]" "=" "1"
       ........ action to show Article1
    Endif
    If "[combobox1]" "=" "2"
       ........ action to show Article2
    Endif
    If "[combobox1]" "=" "3"
       ........ action to show Article3
    Endif
    If "[combobox1]" "=" "4"
       ........ action to show Article4
    Endif
Endif
........continue for other radiogroup selections, etc.

David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Radio Buttons & Article search

Postby sheppard1 » Tue Jun 04, 2013 7:38 am

Thank alot, btw you answered another question i didnt ask :D

How do you note things in the code :D haha ty for that
sheppard1
 
Posts: 25
Joined: Thu May 30, 2013 4:37 pm

Re: Radio Buttons & Article search

Postby dpayer » Tue Jun 04, 2013 8:00 am

sheppard1 wrote:How do you note things in the code :D haha ty for that


Now, if you read the helpfile and search for comments, you would know that!
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests