MXML component invisible in screen after exceeds screen height,help in Scroller
hi
i am new to mxml. i am devloping playbook applucation using MXML.
playbook height is fix 600 and width 1024 in lanscape and in potrait its height and width are reverse.
i have long content to display but after y=600 i don't able to see any component on MXML
i add scroller in MXML then also it not able to display all content.
in MXML all component have x and y co-ordinate associate with it so when y exceeds 600 no component is display on then screen.
so how to add component to scroller and able to display on the screen
Thanks & Regards.
Megha
Thanks Peter, but I've given that a go already.
I'm looking into trying to get the component instantiated
through MXML, and then returning it using it's ID. If another
container addChilds it, then the component will be removed from the
(temporary) display list it was previously added to (simply for
instantiating), correct?
I think these layout issues are only when I instantiate it in
actionscript, but further poking should reveal the truth....
Similar Messages
-
Event Fired when a mxml component is shown on screen
hello,
I have following application structure nested up to 2/3 level.
Application
linkbar connected to viewstack
viewstack
NavigatorContent
mxml Component
NavigatorContent
mxml Component
mxml componet in turn has similar structure
componet
linkbar connected to viewstack
viewstack
NavigatorContent
mxml Component
NavigatorContent
mxml Component
and end component is form which is shown and actions performed
I want to execute specific code when the form is first time shown
which will collect data from server and will show for further actions.
User will edit/delete/update data with various button clicks.
I tried activate event on end component but it seems that it wont get
fired at all. End components are enclosed in BorderContainer or Group.
To test activate event I have used Alert.show only but popup is not shown
when I select link button on penutimate linkbar.
If I am doing something wrong please let me know as well please
guide me which event shall I use so that whenever linkbutton is
pressed on linkbar it will fire that event. In that event I can check
whether it has been called earlier by checking some variable which
will be null in creation complete and set in event fired when linkbutton is pressed.
Thanks and regards
RajaI think 'creationComplete' is the closest event to what you are looking for.
-
After trying to update to ios6 my ipod touch will go from logo to blue screen, any help?
after trying to update to ios6 my ipod touch will go from logo to blue screen, any help?
Try:
- iOS: Not responding or does not turn on
- Also try DFU mode after try recovery mode
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
- If not successful and you can't fully turn the iPod fully off, let the battery fully drain. After charging for an least an hour try the above again.
- If still not successful that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
Apple Retail Store - Genius Bar -
Is it safe to apply a invisible sheild screen protector with the liquid provided? I'm worried it will cause liquid damage to my 4s
Avoid the dock connector and the headphone port. That's where the water sensors are located. Just apply a very small amount of liquid for the InvisiShield or whatever it is.
-
Trying to purchase an app on the ipod after the upgrade to 5.1.1. Asking for security info, but after we answer the questions, we get "An error occured. We couldn't save your changes" on security info screen. HELP!
Us too! We've answered the questions and then get "An error occurred. We couldn't save your changes". Now what? We have a balance in the itunes account that it seems cannot be transferred. What next?
-
Hey guys,
I am trying to simplify my code and break out different parts of the app into different MXML Component files. I have taken my login info and created the LoginScreen.mxml file which calls the doLogin function in its (parent) mxml file FlexCMS. It properly sets the state to 'LoggedIn' but then the LoginScreen.mxml file doesnt hide...
Any ideas?
<!-- FlexCMS.mxml file -->
<s:states>
<s:State name="Login" />
<s:State name="LoggedIn" />
</s:states>
<fx:Script>
<![CDATA[
public function doLogin($username:String, $password:String):void {
loginResult.token = customUserClass.login($username, $password);
protected function loginResultEvent(event:ResultEvent):void {
//Alert.show(event.result.toString(), 'loginResult');
trace(event.result.toString());
if (event.result == true) {
currentState = 'LoggedIn';
trace('currentState: ' + currentState);
]]>
</fx:Script>
<components:LoginScreen includeIn="Login" />
... More code for rest of app that hasnt been broken out to other mxml files yet
<!-- LoginScreen.mxml -->
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:local="*">
<s:layout>
<s:BasicLayout/>
</s:layout>
<s:states>
<s:State name="Login" />
<s:State name="LoggedIn" />
</s:states>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
private var flexCMS:FlexCMS = new FlexCMS(); //get reference to main class
protected function loginClick(event:MouseEvent):void {
flexCMS.doLogin(username_txt.text, password_txt.text);
]]>
</fx:Script>
<s:Panel height="140"
horizontalCenter="0"
title="Login"
includeIn="Login"
verticalCenter="0"
width="250">
<s:TextInput id="username_txt" text="testuser" width="151" x="87" y="10" />
<s:TextInput id="password_txt" text="test" width="151" x="87" y="40" />
<s:Label fontSize="14" text="Username:" x="10" y="10" />
<s:Label fontSize="14" text="Password:" x="10" y="44" />
<s:CheckBox label="Remember Me" x="10" y="68" />
<s:Button click="loginClick(event)" id="login" label="Login" x="168" y="69" />
<!-- <local:FlexCMS -->
</s:Panel>
</s:Group>I did something similar in the past for a few of my apps.
The login screen was a custom TitleWindow component that contained the normal username field, password field and login button and could communicate with the server for authentication purposes. If the authentication was successful then I'd call the PopUpManager's removePopUp method on the login window and change the current state to the authenticated state. -
Loading an "MXML Component" at run-time creates a null object.
Hello!
I have a simple Flex 3 project with an MXML application file (the parent) and an MXML component file (the child).
At run-time I create childs of this component, and I add it to the stage using a simple "this.addChild()" call.
Now, besides that, in the creation loop, after every
newChild = new mcComp();
I want to setup a few more custom parameters which belongs to this class. For example, now I want to set a label's text, this label is at the child.
The issue is that the label isn't created until I exit the creation function, and actually, until my code returns control to the Flash Player.
See my problem here?
With custom classes which resides at .AS files, when I instantiate them with the "new" operator, they run their constructure's code and eveything is fine.
But, when I do the same with those MXML components (which by the way are based over the Canvas class), their constructure do not execute and actually no other child of them is created.
Can anyone please advise? I must be missing some keyword here.. hopefully.Hi Natasha thanks,
The issue is that the creationComplete event doesn't dispatch even when I addChild() the object.
var child:mcChild = null;
for(var i:int; i < 3; i++)
child = new mcChild();
// setting some properties, labels' text etc'
this.addChild(child);
Try this and you'll see - the event doesn't dispatch until you got out of the code flow.
Anyway after looking at Flex's documentation I solved it differently;
After the addChild() call the child receives an "initialize" event. After that I could modify my label.
Thank you though! -
my i touch fell on the floor and is just showing a grey screen. Can't scroll to turn off or view anything on the screen
Try here:
iPod touch: Hardware troubleshooting
However, you likely have a hardware problem since it started after dropping the iPod. If the toubleshooting does not solve the peroblem then make an appointment at the Genius Bar of an Apple store. -
Modifying selection screen with help of radio buttons
Hi,
In my program am using three parameters to download a three different files and I have to use radiobuttons for that.
I want to download only one file at a time.
I have used MODIF ID but it is not working for 3 Parameters but it is working for only two parameters.
Please help me out!!!!!!!!!Hi,
check with the following code
* Parameters and Selection Options
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_lifnr FOR lfm1-lifnr .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:
r_asn RADIOBUTTON GROUP rad1 USER-COMMAND uc1 DEFAULT 'X',
r_ers RADIOBUTTON GROUP rad1 ,
r_830 RADIOBUTTON GROUP rad1,
r_850 RADIOBUTTON GROUP rad1,
r_862 RADIOBUTTON GROUP rad1,
r_810 RADIOBUTTON GROUP rad1,
r_820 RADIOBUTTON GROUP rad1,
r_824 RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECT-OPTIONS: s_bstae FOR lfm1-bstae MODIF ID sd1.
PARAMETERS:
p_ekorg TYPE lfm1-ekorg MODIF ID md1,
p_evcode TYPE edp21-evcode MODIF ID md2,
p_kappl TYPE nach-kappl MODIF ID md3,
p_parvw TYPE nach-parvw MODIF ID md4,
p_kschl TYPE nach-kschl MODIF ID md5,
p_vakey TYPE nach-vakey MODIF ID md6,
p_werks TYPE werks_d MODIF ID md7,
p_bukrs TYPE lfb1-bukrs MODIF ID md8.
SELECTION-SCREEN END OF BLOCK b3.
*eject
* Initialization
INITIALIZATION.
* PERFORM check_authorization.
*eject
* at selection screen
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF r_asn EQ 'X'
AND ( screen-group1 = 'MD3' or screen-group1 = 'MD4'
or screen-group1 = 'MD5' or screen-group1 = 'MD6'
or screen-group1 = 'MD7' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_ers EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD3'
or screen-group1 = 'MD4' or screen-group1 = 'MD5'
or screen-group1 = 'MD6' or screen-group1 = 'MD7'
or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_830 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD6'
or screen-group1 = 'MD7' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_850 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD6'
or screen-group1 = 'MD7' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_862 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_810 EQ 'X'
AND ( screen-group1 = 'MD3' or screen-group1 = 'MD4'
or screen-group1 = 'MD5' or screen-group1 = 'MD6'
or screen-group1 = 'MD7' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_820 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD3'
or screen-group1 = 'MD4' or screen-group1 = 'MD5'
or screen-group1 = 'MD6' or screen-group1 = 'MD7' ).
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_824 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD3'
or screen-group1 = 'MD4' or screen-group1 = 'MD5'
or screen-group1 = 'MD6' or screen-group1 = 'MD7'
or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
*eject
* Event top of page
TOP-OF-PAGE.
*eject
* event Start of Selection
START-OF-SELECTION.
*eject
*EVENT End-of selection
END-OF-SELECTION.
*eject
*EVENT End-of page
END-OF-PAGE.
Regards,
Vikas.
plz reward if helpful.. -
At selection-screen value- help
Hi All,
I have a requirement that based on a radio button one at selection-screen value-help is triggered and on based on a different radio button another at selection-screen value-help should be triggered.
can it be achieved.
Regards,
JeetuAT SELECTION-SCREEN - selscreen_event
Syntax
| { ON {para|selcrit} }
| { ON END OF selcrit }
| { ON BLOCK block }
| { ON RADIOBUTTON GROUP radi }
| { }
| { ON {HELP-REQUEST|VALUE-REQUEST}
| FOR {para|selcrit-low|selcrit-high} }
| { ON EXIT-COMMAND }.
Alternatives:
1. ... OUTPUT
2. ... ON {para|selcrit}
3. ... ON END OF selcrit
4. ... ON BLOCK block
5. ... ON RADIOBUTTON GROUP radi
6. ... { }
7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
{para|selcrit-low|selcrit-high} }
8. ... ON EXIT-COMMAND
Effect
These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
Alternative 1
... OUTPUT
Effect
This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
Note
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
Alternative 2
... ON {para|selcrit}
Effect
This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
Note
If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
Alternative 3
... ON END OF selcrit
Effect
This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
Alternative 4
... ON BLOCK block
Effect
This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
Alternative 5
... ON RADIOBUTTON GROUP radi
Effect
This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
Note
The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
Alternative 6
Effect
The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
Alternative 7
... ON { HELP-REQUEST | VALUE-REQUEST } FOR
{para|selcrit-low|selcrit-high} }
Effect
The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
Notes
These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
Alternative 8
... ON EXIT-COMMAND
Effect
This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
Example
In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
REPORT demo_at_selection_screen.
Global data
DATA: sflight_tab TYPE TABLE OF sflight,
sflight_wa LIKE LINE OF sflight_tab.
Selection screens
PARAMETERS p_carrid TYPE spfli-carrid.
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECT-OPTIONS s_conn FOR sflight_wa-connid.
DATA s_conn_wa LIKE LINE OF s_conn.
SELECTION-SCREEN END OF SCREEN 500.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF sy-dynnr = '0500'.
IF s_conn IS INITIAL.
MESSAGE 'Please enter values' TYPE 'W'.
ELSE.
SELECT *
FROM sflight
INTO TABLE sflight_tab
WHERE carrid = p_carrid AND
connid IN s_conn.
IF sy-subrc <> 0.
MESSAGE 'No flights found' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Main program
START-OF-SELECTION. -
I tried updating my iPod touch 4th gen and now the screen is bright blue or flashing white and black lines.ive tried the whole home and power button thing but it only brings up the apple icons then goes back to the blue or other screen.please help?
This has worked for some others.
- iOS: Not responding or does not turn on
- Also try DFU mode after try recovery mode
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
- If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
- Try on another computer
- If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
Apple Retail Store - Genius Bar -
Passing a variable from an mxml component to the main mxml file
Hey guys,
I have a popup titlewindowt which is defined as a component in a separate mxml component file.
In the popup window i have an inputbox and a button
When i press the button in that popup window i want the text in the input box to be transfered across to a variable in my main mxml file
How can i do this?
Thanks
ChrisSince you are already tied in to the top level application then I would add a listener at the application level and in the component do a:
FlexGlobals.topLevelApplication.dispatchEvent(....)
However, I can't help but encourage you to decouple this functionality and pass events around rather than what you are currently doing.
There are a few ways you can do this. One is to use an MVC framework to model your application after.
A simpler approach even would be to have the component simploy dispatch events to itself and have whatever is creating the component listen for the events and do higher level functionality.
Good Luck! -
Initializing Custom MXML component
Hello,
I am new to flex and the one thing I can't seem to get a handle on is using custom mxml components. The whole not being able to use a constructor to pass data through was a tough thing to adjust to so for the most part I've been writing my own AS classes for display purposes that extend layout containers like VBox and such. This is getting cumbersome and I would really like to use MXML to save some time when writing display classes. For the most part I'm trying to use custom mxml components this way: I put the labels and other controls and then want data to display as text from the calling class. However, when I try to set the text it says that the control I am trying to set hasn't been initialized yet. My workaround is something like this.
var data1:String = "Something";
var customComp:CustomMXMLComponent = new CustomMXMLComponent();
customComp.initialize();
customComp.someControl = data1;
Now why wouldn't someControl on the custom component be initialized when the actual component is initialized? Is there something I can change in the mxml component so that I don't always have to call .initialize() after creating an instance of the custom component?
Thanks!. The "initialize" stuff you had was more concerned with the lifecycle of the component. We don't want to do that , but it is something you should learn about. I think the answer to your problem is to create Bindable variables in your mxml class, then set those parameters.
Observe
<Panel>
<Button label="{buttonLabel1}" >
<Button label="{buttonLabel2}">
<Label label = {labelLabel}>
<Script>
[Bindable] public var buttonLabel1:String;
[Bindable] public var buttonLabel2:String;
[Bindable] public var labelLabel:String;
</Script>
</Panel>
Meanwhile , in another class ...
var customComp:CustomMXMLComponent = new CustomMXMLComponent();
customComp.buttonLabel1 = "Ubuntu";
customComp.buttonLabel2 = "Rocks";
customComp.labelLabel = "My Socks"; -
I was updating my iPad air and in the middle of update it suddently cannot reconnect to my computer and it has the iTunes logo with a plug picture on a black screen, PLEASE HELP!!!! I did try steps from http://support.apple.com/kb/HT1808?viewlocale=en_US - IT DOES'N WORK!
Yes, that is your only option.Yes. You have to restore.
Try the following if you have difficulty restoring.
Try:
- iOS: Not responding or does not turn on
- Also try DFU mode after try recovery mode
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
- If not successful and you can't fully turn the iPod fully off, let the battery fully drain. After charging for an least an hour try the above again.
- If still not successful that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
Apple Retail Store - Genius Bar -
Event in ActionScript Class not accessible by MXML Component
I am implementing an ActionScript Class in my MXML Component,
but it can't see the Event I'm specifying. I'm getting the
following Error when I compile my application:
Cannot resolve attribute 'myEvent' for component type
myClass.
How do I make the Event available to the MXML component?
Thanks.Guess the compiler has a problem with semi-colons after the
Event declarations. I removed the semi-colons, and was able to
compile.
Maybe you are looking for
-
I have a screenshot, but this box will not accept cut and paste?
-
What is wrong with this setup? (samba)
[global] workgroup = Media server string = %h server (Samba, Ubuntu) log file = /var/log/samba/log.%m max log size = 1000 security = share wins support = yes preferred master = no guest account = thomas [Disk (1)] comment = Samba server path = /home/
-
for me what i have to do. i have cs4, but only need adobe pro, illustrator and photoshop. help me for best choice thanks paulo pedro
-
Ap3 - iPhoto: Metadata + Organizational issues
I was hoping for improved cross-app integration with the advent of Aperture 3, but apparently not. Nevertheless, I'm still curious if SOMEONE who uses both programs has figured out a way to do the following: I want to be able to drag MULTIPLE Apertur
-
Video files .mod or .moi from a JVC camera to imovie?
I have a JVC camera GZ-MG360BU from 2009. The video files ends with .mod or .moi and I can´t import the files into iMovie. Can not open the camera from iMovie either. Does the files needs to be converted or how shall I proceed? Any tips appreciated!