newsanti
-
Posts
323 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Posts posted by newsanti
-
-
On mobile devices, when a user interacts with the screen by touching and holding their finger on an element, several events can be triggered. Let’s explore these events:
ontouchstart: This event fires when the user initially touches the screen. It’s equivalent to the onmousedown event for desktop devices. You can use it to detect the start of a touch interaction.
ontouchmove: When the user moves their finger after touching the screen, this event is fired. It allows you to track continuous touch movements. For example, you can use it to create swipe gestures or drag-and-drop functionality.
ontouchend: This event occurs when the user lifts their finger off the screen after touching it. It corresponds to the onmouseup event for desktop devices. You can use it to detect the end of a touch interaction.
Keep in mind that these events are essential for creating responsive and touch-friendly web experiences. If you’re working with CSS animations or other interactive elements, consider using these touch events to enhance user interactions on mobile devices.TunimLabel.OnMouseDown... user lifts their finger off the screen after touching it!
TunimLabel.OnClick... user lifts their finger off the screen after touching it!
How to generate OnMouseDown ...While touching and holding their finger?
-
1 hour ago, newsanti said:
If unimLabel.AutoSize=True
LayoutConfig.Margin does not Effect
use padding
-
If unimLabel.AutoSize=True
LayoutConfig.Margin does not Effect
-
On 2/22/2024 at 11:15 AM, Sherzod said:
This approach may help you:
UnimMemo1.ClientEvents.UniEvents ->
function beforeInit(sender, config) { config.listeners = { keyup: function(textarea) { var inputEl = textarea.inputElement, textHeight = inputEl.dom.scrollHeight; textarea.setHeight(textHeight); } } }
procedure TMainmForm.UnimFormShow(Sender: TObject);
begin
UnimMemo1.Clear;
UnimMemo1.Lines.Add('TestLine1');
UnimMemo1.Lines.Add('TestLine2');
UnimMemo1.Lines.Add('TestLine3');
UnimMemo1.Lines.Add('TestLine4');
UnimMemo1.Lines.Add('TestLine5');
UnimMemo1.Lines.Add('TestLine6');
UnimMemo1.Lines.Add('TestLine7');
UnimMemo1.Lines.Add('TestLine8');
end;
If fill data by code .. How to change height of textarea?
This code change only keyup event. -
37 minutes ago, newsanti said:
Thanks.
37 minutes ago, newsanti said:Thanks.
Finally ..My code completed.
function beforeInit(sender, config)
{
config.listeners = {
keyup: function(textarea) {
var inputEl = textarea.inputElement;
textHeight = inputEl.dom.scrollHeight;if (textarea.getValue() == '') {
textHeight=35;
}
if (textHeight != textarea.getHeight()) {
var H1 = textHeight;
var H2 = textarea.getHeight();
if (H1<=35*4) { textarea.setHeight(textHeight); }
ajaxRequest(sender,'_resize',{newH: H1, oldH: H2});
}
}
}
}- 1
- 1
-
3 minutes ago, Sherzod said:
Remove "then"
Thanks.
-
5 minutes ago, Sherzod said:
?
if textarea.getValue()=='' then //Check when backspace and empty
textHeight=30;if (textarea.getValue() == '') { textHeight=30; }
function beforeInit(sender, config)
{
config.listeners = {
keyup: function(textarea) {
var inputEl = textarea.inputElement;
textHeight = inputEl.dom.scrollHeight;
if (textarea.getValue() == '') {
textHeight=30;
}
textarea.setHeight(textHeight);
if (textHeight != textarea.getHeight()) then { //check to fire resize not work ? How to fix?
ajaxRequest(sender,'_resize',{H: textHeight});
}
}
}
} -
7 hours ago, Sherzod said:
This approach may help you:
UnimMemo1.ClientEvents.UniEvents ->
function beforeInit(sender, config) { config.listeners = { keyup: function(textarea) { var inputEl = textarea.inputElement, textHeight = inputEl.dom.scrollHeight; textarea.setHeight(textHeight); } } }
function beforeInit(sender, config)
{
config.listeners = {
keyup: function(textarea) {
var inputEl = textarea.inputElement;
textHeight = inputEl.dom.scrollHeight;
if textarea.getValue()=='' then //Check when backspace and empty
textHeight=30;
textarea.setHeight(textHeight);
}
}
}If add condition when backspace not work? How to fix it?
-
5 minutes ago, Sherzod said:
Hello,
Your question regarding the resize event is not very clear.
I guess if you are using client-side alignment, you can use layouts.
I want TunimMemo to auto height with textlength.
-
How to setting clientside TunimMemo autoHeight to get width and height with resize event?
-
On 1/2/2024 at 2:00 AM, Farshad Mohajeri said:
Hi,
Have you followed above instructions?
yes. try with new project?
-
On 12/28/2023 at 6:59 PM, Farshad Mohajeri said:
Hello,
Have you followed below instructions?
https://www.unigui.com/doc/online_help/index.html?using-runtime-packages.htm
For 64-bit you need to build "Runtime" uniGUI packages that are listed in above link for Win64 and deploy them with your application.
That said, we always recommend using 32-bit apps along with HyperServer.
Also, if your generated EXE is so big you can turn off all debug information, so the need for runtime packages will be eliminated.
I create new unigui win64 project with runtime packages (1.95.0.1579) problem existed.
-
windows 11 + Delphi 11.3 + uniGUI 1.95.0.1577
Work Perfect with Win32 bit runtime package.
Don't work with win64 bit runtime package!!!!!
rtl;dbrtl;xmlrtl;inetdb;dsnap;dsnapcon;soaprtl;soapserver;soapmidas;IndySystem;IndyCore;IndyIPCommon;IndyProtocols;IndyIPServer;IndyIPClient;vcl;vcldb;vclx;vclimg;vclsmp;vcldsnap
-
15 hours ago, Sherzod said:
Hello,
I haven't downloaded your test case, but please provide the main code here. What are you using?
uses
uniGUIVars, MainModule, uniGUIApplication, uniGUIJSInterface;function MainForm: TMainForm;
begin
Result := TMainForm(UniMainModule.GetFormInstance(TMainForm));
end;procedure TMainForm.Button_PASTEClick(Sender: TObject);
begin
if Clipboard.HasFormat(CF_PICTURE) then
UniImage1.Picture.Assign(Clipboard);
end;initialization
RegisterAppFormClass(TMainForm);
-
This project don't work with production server.
-
function click(sender, eOpts)
{
ajaxRequest(sender,'_click',{H: 200});//How to replace 200 with Height of sender.getHeight?
} -
10 hours ago, Sherzod said:
Hello,
What are these items?
object dtpfUnimM0091HomeMenuShortcutFrame101: TdtpfUnimM0091HomeMenuShortcutFrame101
Left = 0
Top = 0
Width = 170
Height = 130
Layout = 'hbox'
LayoutAttribs.Align = 'center'
LayoutAttribs.Pack = 'center'
ParentAlignmentControl = False
AlignmentControl = uniAlignmentClient
Color = clPurple
TabOrder = 0
ParentColor = False
ParentBackground = False
Background.Fit = True
object Panel_BODY: TUnimContainerPanel
Left = 3
Top = 3
Width = 160
Height = 120
Hint = ''
Color = clWhite
ClientEvents.UniEvents.Strings = (
'beforeInit=function beforeInit(sender, config)'#13#10'{'#13#10'// config.st' +
'yle = "box-shadow: 2px 2px 6px 1px gray;" + config.style;'#13#10' con' +
'fig.style = "border-radius: 10px;" + config.style;'#13#10'}')
LayoutAttribs.Align = 'start'
LayoutAttribs.Pack = 'start'
LayoutConfig.Width = '92%'
object Panel_ICON: TUnimContainerPanel
Left = 23
Top = 3
Width = 125
Height = 60
Hint = ''
Color = 4259584
Layout = 'fit'
LayoutAttribs.Align = 'center'
LayoutAttribs.Pack = 'center'
LayoutConfig.Width = '100%'
object Label_ICON: TUnimLabel
Left = 19
Top = -3
Width = 95
Height = 50
Hint = ''
Alignment = taCenter
AutoSize = False
Caption = '<i class="fa-solid fa-rocket-launch"></i>'
LayoutConfig.Height = '100%'
LayoutConfig.Width = '100%'
LayoutConfig.Margin = '10 0 0 0'
ParentFont = False
Font.Height = -40
Font.Name = 'Noto Serif Thai'
Font.Style = [fsBold]
end
end
object Panel_NAME: TUnimContainerPanel
Left = 23
Top = 56
Width = 125
Height = 60
Hint = ''
Color = 12615935
Layout = 'fit'
LayoutAttribs.Align = 'center'
LayoutAttribs.Pack = 'center'
LayoutConfig.Width = '100%'
object Label_NAME: TUnimLabel
Left = 19
Top = 13
Width = 95
Height = 42
Hint = ''
Alignment = taCenter
AutoSize = False
Caption = #3594#3639#3656#3629#3610#3633#3597#3594#3637
LayoutConfig.Margin = '10 0 0 0'
ParentFont = False
Font.Height = -16
Font.Name = 'Noto Serif Thai'
Font.Style = [fsBold]
end
end
end
end -
-
What is component like treeview in unigui Mobile?
-
7 minutes ago, Sherzod said:
Use this:
UnimEdit1.JSInterface.JSCall('labelElement.applyStyles', [UnimEdit1.FieldLabelFont.ToStyleString(True)]);
Work Perfected.
- 1
-
2 hours ago, Sherzod said:
Can you please clarify?
if ValidateOK then
unimEdit1.FieldLabelFont.Color:= clWindowText
else
unimEdit1.FieldLabelFont.Color:= clRed.
it not work because client fieldLabel do not change display to clred .
-
TunimEdit...
type
TdummyUniFormControl = class(TUniFormControl);
...var oControlX:= TdummyUniFormControl(oControl);
if oNeuron.CheckError then
begin
oControlX.FieldLabelFont.Color:= FormLinkOptions.LabelErrorColor;
oControlX.FieldLabel:= oNeuron.DisplayLabel;
end
not working. (FieldLabel color not change.) -
On 2/12/2020 at 4:53 PM, Sherzod said:
procedure TMainForm.UniFormCreate(Sender: TObject); begin UniButton1.JSInterface.JSAddListener('afterrender', 'function(){this.btnInnerEl.setStyle("line-height", "normal")}'); end;
not work with TUnimButton.
-
How to use HTML with TunimMemo? because TunimHTMLMemo not found.
How to detect ontouchstart of TunimLabel?
in General
Posted