EditorGadget vs. StringGadget: Different border margins

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kurzer
Posts: 90
Joined: Mon May 26, 2014 9:33 am

EditorGadget vs. StringGadget: Different border margins

Post by Kurzer »

Hello,

when I create a StringGadget and an EditorGadget in Spider, the StringGadget has a margin area between the text and the edges of the input field.
With the EditorGadget the text sticks directly to the border of the input field. Can I change this within SpiderBasic or do I have to hack the CSS files of the SpiderBasic libs?

Code: Select all

If OpenWindow(0, 0, 0, 530, 600, "Main - AppName")
   
      TextGadget(0, 5, 135, 90, 25, "Name:", #PB_Text_Right)
      StringGadget(1, 100, 130, 200, 25, "Pusemuckel")
      
      TextGadget(2, 5, 165, 90, 25, "Adresse:", #PB_Text_Right)
      EditorGadget(3, 100, 160, 200, 50, #PB_Editor_WordWrap) : SetGadgetText(3, "Hauptstraße 4, 12345 Pusemuckel")
      
       LoadFont(0, "Arial", 12)
       SetGadgetFont(3, FontID(0))
       
 EndIf
Image

Thanks, Kurzer
SB 2.32 x86, Browser: Iron Portable V. 88.0.4500.0 (Chromium based), User age in 2023: 55y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Paul
Posts: 197
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: EditorGadget vs. StringGadget: Different border margins

Post by Paul »

I find the "claro" Gadget theme (under compiler options) matches closest to what the PureBasic Gadgets look like.
When I use the default "flat" theme I find the size of the Gadgets are all off.

Anyway, do a search on this forum for "modify the theme by code" or "theme of gadgets" and see what Peter posted.
Maybe that will help.
viewtopic.php?f=6&t=1405&p=4930&hilit=theme#p4930
viewtopic.php?f=6&t=1234&p=4295&hilit=theme#p4295
User avatar
Kurzer
Posts: 90
Joined: Mon May 26, 2014 9:33 am

Re: EditorGadget vs. StringGadget: Different border margins

Post by Kurzer »

Hello, Paul,

yes, Peter gives many helpful tips. He has already helped me with this problem in the german PureBasic Forum.

Code: Select all

! $("<style>.dijitTextArea { padding: 4px; }</style>").appendTo("head");
When I have finished the current phase of effort estimation and feasibility analysis for the current project, I will find more time to search the Spider Forum in detail. Thank you for your helpful answers.
SB 2.32 x86, Browser: Iron Portable V. 88.0.4500.0 (Chromium based), User age in 2023: 55y
"Happiness is a pet." | "Never run a changing system!"
Post Reply