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 -> PHP

 change listbox in display mode

Print topic Send  topic

Author Message
lizam
Posted: 04/15/2004, 9:35 PM

Hi,

Using a record builder, I can perform add/update/delete from a single page. I have a few listbox controls on the page. What I want is when I call this page, to use the listbox only in add mode and change to other control such as textbox or label when in edit mode. I'm doing this so that I can just display the record first and provide a link to call another page if the user intends to modify the record.

Appreciate if someone can shed some light on this. TIA.
peterr


Posts: 5971
Posted: 04/16/2004, 12:26 AM

It's rather difficult to provide such functionality since you're designing the pages visually, therefore the screen needs to be defined at design-time and it is not very flexible to change controls later.
I've seen some tricks used to accomplish what you want but some may be too complex to discuss here. The easiest method that comes to mind is to include several controls on the page and then hide the ones that you don't need.
This document describes how to hide controls at run-time: http://docs.codecharge.com/studio/html/ProgrammingTechn...ormControl.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Lizam
Posted: 04/16/2004, 2:23 AM

Hi,

Just to update on my testing by following the example given:

Besides my listbox, I place a textbox control which will display the value from the listbox - using CCGetValue function.

However, using the code below, when in edit mode the control is still visible except that the values in the list are no longer available. Is this the correct behavior?

Before Show listbox1

if ($record->EditMode)
{
...
$record->listbox1->Visible = False;
$record->textbox1->Visible = True;
} else
{
$record->listbox1->Visible = True;
$record->textbox1->Visible = False;
}
peterr


Posts: 5971
Posted: 04/16/2004, 2:33 AM

Sorry, I forgot to add that you may also need to right click on the textbox and listbox, select "Edit TextBox Layout" (and "Edit ListBox Layout" respectively) and then select "Extended HTML". This will create special HTML block around the control that will allow the control to be hidden.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Lizam
Posted: 04/16/2004, 3:30 AM

Voila! Thanks Peter for the prompt reply.

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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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