Questions about Dialog
Posted: Fri Jun 28, 2024 11:16 am
Hi guys,
1. how to add a placeholder text to stringgadgets within dialogs?
2. how to change the editorgadget style - i need a padding
does not work, only on standard editorgadget()
3. how to add labes? in this case they are to far from the input gadgets
Any help is appreciated.
1. how to add a placeholder text to stringgadgets within dialogs?
2. how to change the editorgadget style - i need a padding
Code: Select all
! $("<style>.dijitTextArea { padding: 4px; font-family: Arial; font-size: 12px; line-height: 12px; font-style: normal; font-weight: normal; }</style>").appendTo("head");
3. how to add labes? in this case they are to far from the input gadgets
Code: Select all
Runtime Enumeration Windows
#eWnd
EndEnumeration
Runtime Enumeration Gadget
#T_KATEGORY
#S_KATEGORY
#T_CAREOF
#S_CAREOF
#T_NAME
#S_NAME
#T_ZIP
#S_ZIP
#T_CITY
#S_CITY
#T_STREET
#S_STREET
EndEnumeration
Procedure.s GetXMLString()
Protected XML$
XML$ + "<?xml version='1.0' encoding='UTF-16'?>"
XML$ + "<dialogs>"
XML$ + " <window text='Backend' minwidth='1220' minheight='830' flags='#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_TitleBar|#PB_Window_ScreenCentered' name='#eWnd' xpos='0' ypos='0' id='#eWnd'>"
XML$ + " <hbox>"
XML$ + " <vbox>"
XML$ + " <hbox>"
XML$ + " <vbox>"
XML$ + " <text text='Kategorie' id='#T_KATEGORY'/>"
XML$ + " <string width='190' height='40' id='#S_KATEGORY'/>"
XML$ + " </vbox>"
XML$ + " <vbox>"
XML$ + " <text text='Care of' id='#T_CAREOF'/>"
XML$ + " <string width='220' height='40' id='#S_CAREOF'/>"
XML$ + " </vbox>"
XML$ + " <vbox>"
XML$ + " <text text='Name' id='#T_NAME'/>"
XML$ + " <editor width='380' height='40' id='#S_NAME'/>"
XML$ + " </vbox> "
XML$ + " </hbox>"
XML$ + " <hbox>"
XML$ + " <vbox>"
XML$ + " <text text='ZIP' id='#T_ZIP'/>"
XML$ + " <string width='100' height='40' id='#S_ZIP'/>"
XML$ + " </vbox>"
XML$ + " <vbox>"
XML$ + " <text text='City' id='#T_CITY'/>"
XML$ + " <string width='300' height='40' id='#S_CITY'/>"
XML$ + " </vbox>"
XML$ + " <vbox>"
XML$ + " <text text='Street' id='#T_STREET'/>"
XML$ + " <string width='380' height='40' id='#S_STREET'/>"
XML$ + " </vbox> "
XML$ + " </hbox>"
XML$ + " </vbox> "
XML$ + " </hbox> "
XML$ + " </window>"
XML$ + "</dialogs>"
ProcedureReturn XML$
EndProcedure
CompilerIf #PB_Compiler_IsMainFile
a$ = GetXMLString()
If ParseXML(0, a$) And XMLStatus(0) = #PB_XML_Success
CreateDialog(1)
OpenXMLDialog(1, 0, "#eWnd")
Else
Debug XMLStatus(0)
Debug XMLError(0)
EndIf
SetGadgetText(#S_NAME, "looks like some padding is needed")
SetGadgetText(#S_KATEGORY, "Placeholder?")
CompilerEndIf