I want to create a hyperlink using lwuit and i want to show it on myForm Screen?when i click on the link,it should navigate to the link,i have tried this for LCDUI,I got the result,but i dont know ,how to do it using LWUIT?
There is no specific control for hyperlink in lwuit. But, we can create hyperlink look using buttons.
Button btnHyperlink = new Button("Hyperlink");
btnHyperlink.getUnselectedStyle().setBorder(null);
btnHyperlink.getSelectedStyle().setBorder(null);
btnHyperlink.getUnselectedStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM,Font.STYLE_UNDERLINED, Font.SIZE_MEDIUM));
btnHyperlink.getSelectedStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM,Font.STYLE_UNDERLINED | Font.STYLE_BOLD, Font.SIZE_MEDIUM));
btnHyperlink.getUnselectedStyle().setFgColor(0x0000ff);
btnHyperlink.getSelectedStyle().setFgColor(0x0000ff);
To navigate to another link when click the button, write the navigating code in button's action listener.
Related
Is it possible in Android studio to produce an Image Button after I clicked a button like Add Button. If yes, how? I want to make an attendance app wherein if the user clicks Add Class an image button will appear
We have no idea of which layout of you are using as the parent. But, for the best results of my answer, linear layout is advised.
The thing you are trying to achieve is trying to create dynamic elements.
For this, you can create an instance of the ImageButton class and then add it to you layout. This can be dont as follows:
//inside onclick of the add button
ImageButton newView = new ImageButton(context);
parentView.addView(newView);
You can add customisations to the view before adding it to the view.
Right now I am working on a Xpage which displays data from a domino document. Based on the form of the document different fields will be displayed.
Now I want to create a "New" function. My idea here is to set the view I am previously using in edit mode.
Additionally, I want to add a radio button which enables a user to choose the form of the document he wants to create.
Based on this radio button the document form should change which should result in the elements displayed on the page changing too.
Overall if I switch between the radio button options and hit save, a new document will be created with the right form.
Yet my problem is that my elements in my view won't change dynamically. So if I switch my form there will still be elements/controls displayed for the default option but not the selected form.
My idea was to create an onChange-event for my Radio Button Group.
My questions here would be: How can I change my formValue for the Xpage (new document) and then reload it with the new set value?
Thanks for your explanation.
I understand you have one XPage suitable for multiple forms, I assume using a Switch control and custom controls per form. About the New button, you could try first to have 3 New buttons, each for a separate form, and you create a URL like yoursite.com/xpage.xsp?action=newdocument&form=someform
When the user clicks the button, your page can read the parameters (param.action and param.form) and act accordingly. Or do you intend to update the current page using partial refresh, as a single page approach?
How and where I need to set the data-close-on-click params in my off-canvas to avoid the menu to close when user click on a link inside the menu?
Using jquery:
$('#yourDatePickerID').click(function(e)
e.stopPropagation();
e.preventDefault();
});
Depending on which date picker you are using this may or may not work. It may even not allow you to open the calendar image. If it doesn't work I suggest you look into what event for your date picker is fired when the ok button is clicked. Attach this code to that event instead of the click event and try again.
as the official "DragNDropOutlineView" sample project,
if i have already selected an item,clicked right button for menu,the right clicked item
will be selected & marked with a blue border,but selectionDidChange method was not invoked.
how did it implement?![enter image description here][1]
answer the question myself,
we can not implement this by coding, instead, we can create a menu in the interface builder, choose the table view or outline view, link the "menu" outlet to the menu you created just now.
now when you right click the item , it won't invoke the selectionDidChange notification.
I wish to save information entered by user on my form using a dialogue box.
Dialog d=new.dialog();
d.show("save info","Do you want to save?","OK","Cancel");
Can i add a textfield (edit-textbox) in the dialog box for the user to enter the desired name (alphanumeric) before pressing ok. and if not interested he can simply cancel. I will be saving the information as a hashtable in an object with user selected name.
If it cannot be done in dialog what is the next best way. pl add a piece of code or tutorial for better understanding.
Its a mobile app developed in Codename one. Therefore, even LWUIT users can help.
thanks
try this:
Textfield myTF = new textfield();
Dialog abc = new Dialog();//how ever u wish to initialize it
abc.addComponenet(myTF);//add text field to dialog
abc.show();//show dialog.
Note: Dialog extends a Form. so u get the propertied of a form in your dialog.