CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Disable Listbox Control Without Grey

Print topic Send  topic

Author Message
swilson


Posts: 84
Posted: 02/22/2006, 2:06 PM

I want to use a listbox control for display only. So, I want to disable the control to show a list without any functionality of selection.

When I set the control as follows...
FormNameListboxName.Disabled = true
...the text is grey. I want it to remain black.

How do I do this?
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
wkempees
Posted: 02/22/2006, 2:17 PM

Hey still flying?
Can't be done, at least not without extensive stylesheet hacking.
My advise, one I use all the time, display as a Label.
Put the listbox on a Panel, put the label on another panel same line stick
them next to each other.
Set both panels visibility to Dynamic,
Before show decide which one you want and set visible true.

Walter "Dekemp" (introducing my Handle as you are an aviation guy)




"swilson" <swilson@forum.codecharge> schreef in bericht
news:843fce0756e8d3@news.codecharge.com...
>I want to use a listbox control for display only. So, I want to disable
>the
> control to show a list without any functionality of selection.
>
> When I set the control as follows...
> FormNameListboxName.Disabled = true
> ..the text is grey. I want it to remain black.
>
> How do I do this?
> _________________
> Try to stay in the middle of the air. Do not go near the edges of it.
> The
> edges of the air can be recognized by the appearance of ground, buildings,
> sea,
> trees and interstellar space. It is much more difficult to fly there.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

wkempees
Posted: 02/22/2006, 2:18 PM

.... and set the other one Visible False of course.

"swilson" <swilson@forum.codecharge> schreef in bericht
news:843fce0756e8d3@news.codecharge.com...
>I want to use a listbox control for display only. So, I want to disable
>the
> control to show a list without any functionality of selection.
>
> When I set the control as follows...
> FormNameListboxName.Disabled = true
> ..the text is grey. I want it to remain black.
>
> How do I do this?
> _________________
> Try to stay in the middle of the air. Do not go near the edges of it.
> The
> edges of the air can be recognized by the appearance of ground, buildings,
> sea,
> trees and interstellar space. It is much more difficult to fly there.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

swilson


Posts: 84
Posted: 02/22/2006, 2:31 PM

Yes, still flying - and, I should be doing that and not programming!

I'm not quite understanding your suggestion. What I'm trying to accomplish is, in the middle of a record form, I want to display a list from a different table that's related to the record at hand. In other words I want to display a list of items and do not understand how to use a label control to display a list or array. I only see how to do this with the listbox control, but I don't like the grey.

Thanks!
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
swilson


Posts: 84
Posted: 02/22/2006, 2:32 PM

What I really want is a grid in the middle of my record form!
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
wkempees
Posted: 02/22/2006, 2:35 PM

Ok so I misunderstood your objective.
What I meant was I have a Form on the form is a listbox from which users can
pick values.
When the form is in non-edit mode I want the Listbox to be display only and
it will grey out.
To have a clean display, in non edit mode I hide the panel on which the
listbox is and unhide the label or texbox containing panel.
Therefore I am showing the value in black but selection is no longer
possible (it isn't possible but it will scroll and that's confusing to the
user.

You want the Listbox in display mode, to do what ?



"swilson" <swilson@forum.codecharge> schreef in bericht
news:843fce62e7fa02@news.codecharge.com...
> Yes, still flying - and, I should be doing that and not programming!
>
> I'm not quite understanding your suggestion. What I'm trying to
> accomplish is,
> in the middle of a record form, I want to display a list from a different
> table
> that's related to the record at hand. In other words I want to display a
> list
> of items and do not understand how to use a label control to display a
> list or
> array. I only see how to do this with the listbox control, but I don't
> like
> the grey.
>
> Thanks!
> _________________
> Try to stay in the middle of the air. Do not go near the edges of it.
> The
> edges of the air can be recognized by the appearance of ground, buildings,
> sea,
> trees and interstellar space. It is much more difficult to fly there.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

wkempees
Posted: 02/22/2006, 2:40 PM

Nice task, tell me how when you did it, haha
A grid in your form, put it in an Iframe?
OR
put in a Textarea, size it to you liking and maximum size, then in the
before show
Select the values from the other table separating them with a <br>
resulting in a list in a textarea with scroll bars? you could even built a
table around them and produce alternate row coloring.

Just some idea's, flying instruments only.

"swilson" <swilson@forum.codecharge> schreef in bericht
news:843fce67790b72@news.codecharge.com...
> What I really want is a grid in the middle of my record form!
> _________________
> Try to stay in the middle of the air. Do not go near the edges of it.
> The
> edges of the air can be recognized by the appearance of ground, buildings,
> sea,
> trees and interstellar space. It is much more difficult to fly there.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

swilson


Posts: 84
Posted: 02/22/2006, 4:39 PM

Almost there. How do I set the TextArea control for content of HTML so it recognizes the line breaks? THANKS!
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
swilson


Posts: 84
Posted: 02/22/2006, 5:38 PM

Solved! Thanks Dekemp.

Here's what I ended up with:
'TextArea DBANames Event BeforeShow. Action Custom Code @282-73254650  
    ' -------------------------  
If Request.QueryString("ID") <> "" then  
Dim Sel As SqlCommand = new SqlCommand("SELECT DBA FROM DBA WHERE EID =" &  Request.QueryString("ID"), _  
              Settings.IDPCessnaDataAccessObject)  
Dim DBANameCol As DataRowCollection  = Sel.Execute().Tables(0).Rows  
  
For i = 0 To DBANameCol.Count - 1  
Entities1DBANames.Text = Entities1DBANames.Text + DBANameCol(i)(0)  
If i < DBANameCol.Count - 1 then Entities1DBANames.Text = Entities1DBANames.Text + vbCrLf  
  
Next i  
End If  
    ' -------------------------  
'End TextArea DBANames Event BeforeShow. Action Custom Code

Now, I just need to figure out how to make the font in the text area match the textboxes....
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
Benjamin Krajmalnik
Posted: 02/24/2006, 10:14 AM

Use the style on the textbox to set it to whatever you want.

swilson


Posts: 84
Posted: 02/24/2006, 10:21 AM

Right. I am using a textarea, and did not have success affecting the text area with the style property. Either it's not that simple, or I'm missing something simple.
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
wkempees
Posted: 02/24/2006, 12:50 PM


In Html just after <title></title> before </head>
  
<style type="text/css">  
<!--  
  
..wislonstextarea  
{  
color: black;  
scrollbar-arrow-color: #FFFF00;  
scrollbar-face-color: #FF0000;  
scrollbar-highlight-color: #0000FF;  
scrollbar-3dlight-color: #008000;  
scrollbar-shadow-color: #00FFFF;  
scrollbar-darkshadow-color: #008080;  
scrollbar-track-color: #FFA500;  
}  
  
-->  
</style>  

then find your textarea declaration in HTML

<textarea class="wilsonstextarea" cols="20" rows="8">
</textarea>

Apart from that if you set the textarea as disabled it will grey out, if you
set it to readonly it will stay black and the content cannot be changed.

Just pointing your compass.


ADJUST as needed
"swilson" <swilson@forum.codecharge> schreef in bericht
news:843fce0756e8d3@news.codecharge.com...
>I want to use a listbox control for display only. So, I want to disable
>the
> control to show a list without any functionality of selection.
>
> When I set the control as follows...
> FormNameListboxName.Disabled = true
> ..the text is grey. I want it to remain black.
>
> How do I do this?
> _________________
> Try to stay in the middle of the air. Do not go near the edges of it.
> The
> edges of the air can be recognized by the appearance of ground, buildings,
> sea,
> trees and interstellar space. It is much more difficult to fly there.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

swilson


Posts: 84
Posted: 02/24/2006, 2:49 PM

Thank you for the lesson!
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
wkempees
Posted: 02/24/2006, 2:51 PM

my pleasure, but not a lesson in the patronizing way, by no means.

"swilson" <swilson@forum.codecharge> schreef in bericht
news:843ff8d8ab98f1@news.codecharge.com...
> Thank you for the lesson!
> _________________
> Try to stay in the middle of the air. Do not go near the edges of it.
> The
> edges of the air can be recognized by the appearance of ground, buildings,
> sea,
> trees and interstellar space. It is much more difficult to fly there.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.