Problem Displaying Items

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Dec 2007
Posts: 252
Reputation: ProfessorPC is an unknown quantity at this point 
Solved Threads: 27
ProfessorPC ProfessorPC is offline Offline
Posting Whiz in Training

Problem Displaying Items

 
0
  #1
Jun 16th, 2008
hello,
I am having a problem getting all of my items to display correctly. I have a form that has a combobox. When this combobox changes I need to display different items on the form. This is the code to do this but for some strange reason not all items are set to visible.

  1. Public Function clear() As Boolean
  2. grpDate.Visible = False
  3. grpDoct.Visible = False
  4. grpHide.Visible = False
  5. grpMain.Visible = False
  6. grpOptions.Visible = False
  7. grpPatHasIns.Visible = False
  8. grpSig.Visible = False
  9. grpZip.Visible = False
  10. grpInv.Visible = False
  11. grpInsurance.Visible = False
  12. grpDur.Visible = False
  13. End Function
  14. Private Sub cboReport_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboReport.SelectedIndexChanged
  15. Select Case cboReport.SelectedIndex
  16. Case 0 'Daily Totals
  17. clear()
  18. grpHide.Visible = True
  19. grpDate.Visible = True
  20. Case 1 'Daily Prescriptions
  21. clear()
  22. grpMain.Visible = True
  23. grpDate.Visible = True
  24. txtMainZip.Visible = True
  25. chkMainShowDirect.Visible = True
  26. Case 2 'Patient Profile
  27. clear()
  28. grpMain.Visible = True
  29. grpDate.Visible = True
  30. Case 3 'Patient Info
  31. clear()
  32. grpZip.Visible = True
  33. grpPatHasIns.Visible = True
  34. Case 4 'Doctor Info
  35. clear()
  36. Me.grpZip.Visible = True
  37. Case 5 'Insurance Analysis
  38. clear()
  39. grpDate.Visible = True
  40. grpInsurance.Visible = True
  41. Case 6 'Drug Inventory
  42. clear()
  43. grpInv.Visible = True
  44. Case 7 'DUR
  45. clear()
  46. grpDur.Visible = True
  47. grpDate.Visible = True
  48. grpDoct.Visible = True
  49. Case 8 'SIG Codes
  50. clear()
  51. grpSig.Visible = True
  52. Case 9 'Current Medications (Refills Available)
  53. clear()
  54. grpDate.Visible = True
  55. grpMain.Visible = True
  56. chkMainShowSig.Visible = True
  57. chkMainShowVoid.Visible = True
  58. lblMainFacility.Visible = False
  59. lblMainZip.Visible = False
  60. chkMainShowDirect.Visible = False
  61. chkMainRphSig.Visible = False
  62. txtMainFacility.Visible = False
  63. txtMainZip.Visible = False
  64. Case 10 'Delivery Ticket
  65. clear()
  66. grpDate.Visible = True
  67. grpMain.Visible = True
  68. chkMainPatSig.Visible = False
  69. chkMainShowCost.Visible = True
  70. chkMainShowPrice.Visible = True
  71. chkMainqty.Visible = True
  72. lblMainZip.Visible = False
  73. lblMainFacility.Visible = True
  74. txtMainFacility.Visible = True
  75. chkMainRphSig.Visible = False
  76. chkMainShowDirect.Visible = False
  77. chkMainShowSig.Visible = False
  78. Case 11 'Pickup Ticket
  79. clear()
  80. grpMain.Visible = True
  81. grpDate.Visible = True
  82. chkMainShowSig.Visible = False
  83. chkMainShowCost.Visible = False
  84. chkMainShowPrice.Visible = True
  85. txtMainZip.Visible = False
  86. lblMainZip.Visible = False
  87. chkMainShowVoid.Visible = False
  88. Case 12 'Refill Compliance
  89. clear()
  90. grpDoct.Visible = True
  91. grpDate.Visible = True
  92. grpMain.Visible = True
  93. chkMainShowPrice.Visible = False
  94. chkMainShowCost.Visible = False
  95. chkMainShowVoid.Visible = False
  96. chkMainShowDirect.Visible = False
  97. End Select
  98. End Sub

Any ideas and tips are greatly appreciated.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: Problem Displaying Items

 
0
  #2
Jun 17th, 2008
I would guess these are textboxes or labels. If there is no text in them and no border and the backcolor is the same as the form then you will not see anything. Try using a border around them and see if that doesn't solve you problem.
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 509
Reputation: selvaganapathy is an unknown quantity at this point 
Solved Threads: 88
selvaganapathy's Avatar
selvaganapathy selvaganapathy is offline Offline
Posting Pro

Re: Problem Displaying Items

 
0
  #3
Jun 17th, 2008
Can you tell specifically, when selecting an item which item(control) is not visible.
KSG
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 252
Reputation: ProfessorPC is an unknown quantity at this point 
Solved Threads: 27
ProfessorPC ProfessorPC is offline Offline
Posting Whiz in Training

Re: Problem Displaying Items

 
0
  #4
Jun 17th, 2008
I have a groupbox grpmain that will not display. Some other objects are not displaying as well but the main one is the grpmain.
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: Problem Displaying Items

 
0
  #5
Jun 17th, 2008
Have you stepped thru the code to see if the visible portion is being executed?
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 252
Reputation: ProfessorPC is an unknown quantity at this point 
Solved Threads: 27
ProfessorPC ProfessorPC is offline Offline
Posting Whiz in Training

Re: Problem Displaying Items

 
0
  #6
Jun 17th, 2008
i have stepped through the code. it hits the code to set visible = true but after continuing and i mouse over the visibility is still set to false. very odd.
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: Problem Displaying Items

 
1
  #7
Jun 17th, 2008
I just ran your code. All the group boxes showed up like they should. I did see that you are hiding some controls in places in your code and not showing them again. Click on "Daily Pescription" and you will see all the controls (textboxes, labels and checkboxes). Now click on "Pickup Ticket" and some of the controls are turned off. Now click on "Daily Pescription" and then ones turned off in "Pickup Ticket" are still turned off. This is inconsistent.
As for the group boxes they do turn on and off as expected.
You might have to reinstall vb.......
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 252
Reputation: ProfessorPC is an unknown quantity at this point 
Solved Threads: 27
ProfessorPC ProfessorPC is offline Offline
Posting Whiz in Training

Re: Problem Displaying Items

 
0
  #8
Jun 18th, 2008
i havent really went as far as displaying everything as its needed. I have ran into this problem of the main grp not displaying correctly. without that group there isnt much else i could really do so i was concentrating on that more then the other items.
i was afraid of the reinstall being the option. thanks for you time in helping with this. I am off to reinstall.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC