Thread: Pocket Weather
View Single Post
  #18 (permalink)  
Old 11-18-2008, 06:32 PM
digitaldon37 digitaldon37 is offline
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 215
Default

Quote:
Originally Posted by klaus View Post
Hi digitaldon37,

In the location search part of the program you should change one line.
Code:
<font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">
<font size=
"2"><font face="Courier New"><font color="#0000ff">Sub </font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">cbxCountry_SelectionChanged (Index, Value)</font></font>
</font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">Dim</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2"> txt</font></font>
 
<font size=
"2"><font face="Courier New">  cbxCity.Visible=</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">True</font></font></font>
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font face="Courier New"><font size="2">  RegionI=Index</font></font>
<font size=
"2"><font face="Courier New">  txt=</font></font></font></font><font face="Courier New"><font size="2"><font color="#800000"><font face="Courier New"><font size="2"><font color="#800000"><font face="Courier New"><font size="2"><font color="#800000">"http://weather.yahoo.com/"</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">&AL2.Item(Index)</font></font>
<font size=
"2"><font face="Courier New">  WebRequest(txt)</font></font>
<font size=
"2"><font face="Courier New">  BrowseSubRegional</font></font>
</font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">  If</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2"> cbxCity.Count > </font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2"><font face="Courier New"><font size="2"><font color="red"><b>20 </b></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">AND </font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">StrAt</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">(cbxCity.Item(</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">0</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">),</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">0</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">) = </font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">StrAt</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">(cbxCity.Item(cbxCity.Count-</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">1</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">),</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">0</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">) </font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">Then</font></font></font>
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font face="Courier New"><font size="2">    cbxAlphabet.Visible = </font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">True</font></font></font>
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font face="Courier New"><font size="2">    cbxAlphabet.SelectedIndex=</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">0</font></font></font>
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">  Else</font></font></font>
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font face="Courier New"><font size="2">    cbxAlphabet.Visible = </font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">False  </font></font></font>
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">  End </font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">If</font></font></font>
<font size=
"2"><font face="Courier New"><font color="#0000ff">End Sub</font></font></font>
</font></font></font></font></font></font>
You should replace 1 by 20. Because the routine checks if the first character of the first and last city name is equal and if yes displays the alphabet combobox.
Unfortunately for Estonia there is only 1 city list but the first and last city names begin with the same character.

Best regards.
Thanks. I made the change and am testing with some other minor tweaks.
Reply With Quote