How to set width of a select list?
Hi,
another newbie question from me :-)
When I create a select list the default width is 30, no matter what I set this value to the width of the select list stays the same, it gets as wide as the widest element in the list. This messes the design of the page. I f I have three select lists in a column I want them to have the same width. How do I accomplish that?
/Magnus
Edit the item and in the HTML Form Elements Attributes field type the following:
style="width:120px";adjust the 120 to whatever width you like
Shunt
Similar Messages
-
How to set width of apex_item.select_list_from_lov?
Hello experts!
Sorry to bother you but I can't find out how to set the width of a select list generated in my query.
I already had a look at the Oracle Express Api docu but and tried the following to no avail.
apex_item.select_list_from_lov(8, a.lng_arbeitsschritt, 'Auftakt_LOV','.style.width = "300px";',
'%', null,null, null, 'class="combobox"')Do you have a better idea?
Many thanks,
SebastianI just did some more testing and discovered that the following works:
apex_item.select_list_from_lov(8, a.lng_arbeitsschritt, 'Auftakt_LOV','style="width:500px";',
'%', null,null, null, 'class="combobox"')Maybe this helps others as well!
Thanks for having a look!
BR,
Seb -
How to Build an Auto-Expanding Select list
Hi everyone,
I want to know if it's possible How to Build an Auto-Expanding Select list ?
I saw some discussions which tell us to use Jquery to acheive this. Is it the only solution ?
I want a solution that it is easy to implement.
Thanks in advance. Bye.Hi,
Not sure what you've seen before, but anywhoo:
In my select list, i set element attributes of :
style="min-width: 130px"Just because some of the smaller values were getting truncated.
Then I add this onload javascript code:
$('#P10_AUTO_EXPANDING').change(function(){
$(this).width($('option:selected', this).text().length*10)
})It's not perfect for getting the right size (i.e. i think it increases exponentially, but you can play around with the multiplier)
Which you can see: http://apex.oracle.com/pls/apex/f?p=45448:10:
Edited by: trent on Dec 15, 2011 10:35 AM
Probably best to add this line of code:
$(this).width($('option:selected', this).text().length*10)
into a dynamic action for a change event of the item, of which the true action is to execute javascript code. -
How to set background color for selected days in DateChooser
How to set background color for selected days. I created
checkbox for each day [Son,Mon,Tue,Wed,Thu,Fri,Sat] and a
DateChooser, I want to change the background color for the selected
day when i click on a button after selecting the desired checkboxs
[ monthly wise/yearly wise]
Thanks in advanceThere is no button involved in the following code, but it may
be of use to you:
<?xml version="1.0"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script>
<![CDATA[
private var origColor:uint;
private function init():void {
origColor = dc.getStyle("selectionColor");
public function setBackGrdColors(newColor:uint):void {
dc.setStyle("selectionColor", origColor);
if(dc.selectedDate){
var dayOfWeek:Number = dc.selectedDate.day;
else{
return;
switch(dayOfWeek) {
case 0:
if(sun.selected)
dc.setStyle("selectionColor", newColor);
break;
case 1:
if(mon.selected)
dc.setStyle("selectionColor", newColor);
break;
case 2:
if(tue.selected)
dc.setStyle("selectionColor", newColor);
break;
case 3:
if(wed.selected)
dc.setStyle("selectionColor", newColor);
break;
case 4:
if(thu.selected)
dc.setStyle("selectionColor", newColor);
break;
case 5:
if(fri.selected)
dc.setStyle("selectionColor", newColor);
break;
case 6:
if(sat.selected)
dc.setStyle("selectionColor", newColor);
break;
default:
break;
]]>
</mx:Script>
<mx:VBox horizontalAlign="center" verticalGap="20">
<mx:DateChooser id="dc" textAlign="left"
change="setBackGrdColors(cellColor.selectedColor)"/>
<mx:HBox width="100%" horizontalAlign="center">
<mx:CheckBox id="sun" label="Sun"/>
<mx:CheckBox id="mon" label="Mon"/>
<mx:CheckBox id="tue" label="Tue"/>
<mx:CheckBox id="wed" label="Wed"/>
</mx:HBox>
<mx:HBox width="100%" horizontalAlign="center">
<mx:CheckBox id="thu" label="Thu"/>
<mx:CheckBox id="fri" label="Fri"/>
<mx:CheckBox id="sat" label="Sat"/>
</mx:HBox>
<mx:HBox width="300" horizontalAlign="center">
<mx:Label text="Background Color" />
<mx:ColorPicker id="cellColor"
selectedColor="#FF00FF"/>
</mx:HBox>
</mx:VBox>
</mx:Application> -
How to fix the length of select list box?
Halo, i am doing the research. I need to find out what is the method to fix the length of select list box. This is b'cos i can set the length of select list due to different length of record(s)/data(s).
Another question to select list box. What is the maximum length of the select list box?? Can i enter the character with 255 lenght??
Thank you very much..... a prompt reply will be appreciate!!Thanks for ur reply! actually that answer that you gave is right, but i also need to know what is the maximum lenght of character in the select list box?? any idea to that??
Meanwhile, i also need to know how can i make the character display in select list box dynamically?? that means i can change the font style or font size??
Anyway, thanks for ur answer.
bscs. -
How to set width for this modal dialog box?
Hi All,
How to set width to this modal dialog box:
<input id="btnVote" onclick="javascript:SP.UI.ModalDialog.showModalDialog({ url: '../Lists/Sports%20Activities%20Voting/NewForm.aspx', title: 'User Survey'}); return false;" type="button" value="Vote"/>
Thanks in advance!set as bellow:
<input id="btnVote" onclick="javascript:SP.UI.ModalDialog.showModalDialog({ url: '../Lists/Sports%20Activities%20Voting/NewForm.aspx', title: 'User Survey',width:700,height:350}); return false;" type="button" value="Vote"/>
yaşamak bir eylemdir -
How to get the value from select list to text box
Hi,
I have a select list i want to retrieve the value from select list to text box.
How can i do that???
Regards,
Sakthi.Hi Sakthi,
Yo can use the Java script for that..
Dynamically the value will come into text box.
Use the below script.
<script type="text/javascript">
function disFormItems()
var lReturn = $v(here your select list name)
alert(lReturn);
document.getElementById(here your text box name).value =lReturn; }
</script>Cheers,
Shan -
How to enter values in the selected list by pressing f4
Hi Gurus,
I have a problem can any one help me in solving this?
When we go to any table thorugh se11 or se16 to display all the records based on the selective fields like pernr, company code, benefit plan in a Z-table
Here when I want to display records of selected benefit plans by using the field bplan. here when I go to that bplan field and press f4 then gives me a list of benefit plans, from that list I have to select proper benefitplan for selected records of that plan
1. Question:
I have two new plans , can any suggest me how to add in the f4 list of that field. Is it done through any program?
Another issue,
I have a report program, when I execute it gives me selected list fields like pernr, date, and some more fields. if you select some fields with the help of f4 , we can choose correct value,
2 Question,
I have two new parameters to be added in the f4 list of the fields in the Needed very urgent?
Thanks
RaviHi
You can create a search for that field with more than one fields and yu can add the search help for that field
see the doc
1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
3)An elementary search help defines the standard flow of an input help.
4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
CREATION:
Go to SE11 Tcode
select search help
give the 'z' search help name and create
select the selection method ur table name eg : 'mara'
dialog module 'display value immediately'.
add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
where left position when displaying and spos = search position
and then save and activate ..
See the links:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
pls go through this for search help creation
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
Search Help Exits:
Re: dynamic values for search help
Re: Dynamic search help
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm
https://forums.sdn.sap.com/click.jspa?searchID=4390517&messageID=1712818
You can add F4 values for that field using the following
See the following ex:
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for s_mat-low.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-low.
ENDIF.
Go through the test program.
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
Regards
Anji -
How can I get two column selection list in my html form
I required to have two column selection list in my jsp page to show name and description of a product. How can i achieve this functionality or is there any other alternative to do so.
If i understand correctly: you can't actually create two columns in a list because it can only hold one value. The only way to achieve what you want is by concatenating the two values you want to display and put this as the value of the listbox.
-
How to set width of a vertical scrollbar (such as in a combobox)
I have a combox. I have successfully figured out how to set the font name and font size for each time, however as I have increased the normal very tiny size of the combobox items (now more legible), the remaining last problem is the measly 16 pixels for the scrollbar. This might be acceptable on a desktop with a precise cursor positioning system, but for mobile apps I need a way larger scrollbar thickness, perhaps 30 pixels. How does one set the scrollbar thickness for a combobox? I am willing to stick with scaled up icons from whatever is being drawn as a default, so if possible I would just like to set some style number. But can't find any documentation on this. The Apple system has a nasty fixed width scrollbar (20 pixels), and so far it seems Adobe Flash is using only 16. Great for when you are cramped but I am trying to UN-CRAMP the user interface!
any help is greatly appreciated. A free copy of Discus ($40 value) for whomever helps me solve this vexing problem with the least amount of effort!
edjEdit the item and in the HTML Form Elements Attributes field type the following:
style="width:120px";adjust the 120 to whatever width you like
Shunt -
How to set Width of a JPanel?
I am overwirting paintComponent(Graphics g) method to
draw some g2D in a JPanel.
I want the drawing processing shown on screen (not flashed out after drawn because it is VERY SLOW).
So that I CAN NOT use setsize() or setBound() because to change JPanle.width because this is NOT what I wanted(the graphics is shown AFTER is drawn).
Everytime I call paintComponent(), the width of JPanel is changed.
My question is : How can change JPanel.width without calling method like setsize() or setBound() .
Thanks a lot!!My code too large, I just show some idea here:
class caller (){
myPanel p;
Graphics2D g2 = (Graphics2D)p.getGraphics();
//I nee to increase the p.width before call my_paint
//I CAN NOT use setsize() or setBound()
//because I want show the drawing process
//on screen( and that is fast)
p.my_paint(g2); // how to set p.width ??
public class myPanel extends JPanel
public void my_paint(Graphics2D g2)
//Do my drawing here ,
// I need to draw thousands of Line2D.
public void paintComponent(Graphics g){
Graphics2D g2 = (Graphics2D)g;
my_paint(g2); -
How to set width of a TextField ?
Hi all,
I want to use Polish in my javaME code , so I add //#style style_name before calls of constructor TextField.
The problem is that when I run the application then the textfield is very small in width ! And when I try to enter a value inside then a big textarea is shown in the screen in which I enter the value ; and after that I click the "Ok" command item and I finally return to my form.
I use a polish.css file to define the style.
So how to set a width for a TextField ?
Thank you very much indeednever mind. I forgot a line in my layout manager.
-
How to write a PL/SQL select list with submit page?
Let's we need some select list that are related with each other. I wrote such a code.
declare
gn_start_id number := 0;
glabel1 VARCHAR2(100) := 'Group ';
glabel2 VARCHAR2(100) := 'Property';
begin
htmldb_application.g_f01(1) := 100;
htp.p('<BR>');
htp.p
( glabel1 || ' : ' ||
htmldb_item.select_list_from_query
p_idx => 1,
p_value => '--Select a value--',
p_query => 'SELECT m.vproperty, m.NMAP_PK_ID
FROM table m
WHERE m.ngroupid = ' || to_char(gn_start_id),
p_show_null => 'NO',
p_null_value => 0)
htp.p('<BR>');
htp.p
( glabel2 || ' : ' ||
htmldb_item.select_list_from_query
p_idx => 2,
p_value => '--Select a value--',
p_query => 'SELECT m.vproperty, m.NMAP_PK_ID
FROM table m
WHERE m.ngroupid = ' || to_char(htmldb_application.g_f01(1)),
p_show_null => 'NO',
p_null_value => 0)
end;
However, I am not able to submit page automaticly, when user select a value from the select list?
How can I do this? ThankzI found such a solution.. thanks
htp.p('</TD><TD>');
htp.formselectopen(cname => 'v_status', cattributes => 'class="ddl" onChange="javascript:update_status(this.value)"');
FOR rec IN cur_status LOOP
IF rec.status_id = v_status THEN
htp.formselectoption(cvalue => rec.status_name, cattributes => 'value="' ||
rec.status_id || '"', cselected => 'TRUE');
ELSE
htp.formselectoption(cvalue => rec.status_name, cattributes => 'value="' ||
rec.status_id || '"');
END IF;
END LOOP;
htp.formselectclose; -
How to set only one row selection in ALV GRID DISPLAY
How to set single row selection in grid display
not multiselection.Hi,
In the USER COMMAND, build the code to check the REFRESHED Data & then check the number of records with SEL = 'X'.
If more than single entry found, then raise an error message.
Best regards,
Prashant -
How to set Datagrid 1st row selected
I want to set 1st row as selected = true as default in
datagrid after loading the form which out clicking on any item i
want to set the 1st row as selected, how can i achieve this.
Thanks in advanceThanks for your help,
Here's the code which i wrote
datagrid creationComplete="changeColor();"
[code]
private function changeColor():void
dgrid.selectedIndex = 0;
dgrid.setStyles("selectionColor","#800f3e");
[/code]
Maybe you are looking for
-
Usb 6009:connecting the sensor and motor
Hi there, I am new to the labview also the usb-6009. I want to know if I can connect my sensor to the device. The output of the sensor is either analog voltage, pulse width or serial.If I want to use the AN pin, can I just connect the wire to the ADC
-
I'm trying to start the postgresql service on my systemd installation. I've followed the instructions on the wiki. First I installed the package postgresql, then I uncommented the PGROOT line in the configuration file. When I try to run systemctl sta
-
Is there some place to check that ichat works, a site or something, rather than having to get a friend to be available and testing his patience as I go through many troubleshooting procedures?? GH imac flat panel 15 Mac OS X (10.4.3) imac flat pa
-
Problem 6500 Classic. Camera & Flash not Syncroniz...
On my 6500 Classic 1 week old i have a problem,in camera mode the flash does not seem to be syncronized with the camera, once the image is captured the image is dark apart from a small strip at the right side of the screen. I also cannot activtae nig
-
Nokia 311 asha - wifi????
Nokia, I get mad. My son bought yesterday a Nokia Asha 311. So far everything was ok. But what I do, you can not connect it to the internet via wifi! I updated the phone recently. But it did not help. I have read threads where other owners of that pa