1 of 10 labels not displaying
Posted: Wed Jul 17, 2019 7:14 pm
I made a few minor changes to a program that I had written about a year ago and for some reason 1 of my labels is not displaying on the screen. The only changes made to the labels was a slight change in vertical positioning.
Here is my Enumeration:
And here is the procedure where the label is being used:
All of the labels and TextGadgets display ok. Only the "Meaning" label is not displaying. I can't see anything different with the label code from the others. At first I thought maybe it was being hidden under the background image but, if that were the case, how come the other labels are not also hidden under the background image?
Anyone see a problem that I am missing?
Here is my Enumeration:
Code: Select all
Enumeration
; Windows
#MainWindow
;Databases
#dbaseID
; Buttons
#searchBtn
#getRecBtn
#prevBtn
#nextBtn
#exitBtn
; Labels
#header
#footer
#labelName
#labelMeaning
#labelPronounce
#labelPeriod
#labelGroup
#labelSize
#labelLived
#labelDiet
#labelFossils
#labelFactfile
#labelPicture
#labelCompare
;Text Boxes
#name
#meaning
#pronounce
#period
#group
#size
#lived
#diet
#fossils
#factFile
;Edit Boxes
#search
; Images
#img0
#img1
#img2
#img3
#headerImg
#searchIcon
; Miscellaneous
#headerFont
#footerFont
#kbdSearch
#RecNo
EndEnumeration
Code: Select all
Procedure setupScreen()
path$ = GetPathPart(ProgramFilename())
imagePath3 = path$ + "images\header.jpg"
LoadImage(#img3,imagePath3)
;---------------{ Setup Header ]---------------
ImageGadget(#headerimg,0,0,1280,678,ImageID(#Img3)) ;Used as background
DisableGadget(#headerimg,1)
;----------------{ Setup Labels ]----------------
TextGadget(#labelName, 90, 205, 45, 20, "Name : ")
TextGadget(#labelMeaning, 80, 256, 50, 20, "Meaning : ")
TextGadget(#labelPronounce, 50, 305, 85, 20, "Pronounciation : ")
TextGadget(#labelPeriod, 92, 353, 50, 20, "Period : ")
TextGadget(#labelGroup, 68, 403, 70, 20, "Main Group : ")
TextGadget(#labelSize, 103, 454, 30, 20, "Size : ")
TextGadget(#labelLived, 98, 503, 40, 20, "Lived : ")
TextGadget(#labelDiet, 105, 552, 30, 20, "Diet : ")
TextGadget(#labelFossils, 95, 598, 50, 20, "Fossils : ")
TextGadget(#labelFactfile, 585, 627, 50, 20, "Fact File : ")
For colorGadgets = #labelName To #labelFactFile
SetGadgetColor(colorGadgets, #PB_Gadget_BackColor, RGB(226,222,213))
SetGadgetColor(colorGadgets, #PB_Gadget_FrontColor, RGB(62, 34, 7))
Next
;---------------{ Setup Data Fields ]-----------------
TextGadget(#name, 145, 202, 200, 20, "", #SS_CENTERIMAGE)
TextGadget(#meaning, 145, 250, 200, 20, "", #SS_CENTERIMAGE)
TextGadget(#pronounce, 145, 302, 200, 20, "", #SS_CENTERIMAGE)
TextGadget(#period, 145, 351, 200, 20, "", #SS_CENTERIMAGE)
TextGadget(#group, 145, 400, 200, 20, "", #SS_CENTERIMAGE)
TextGadget(#size, 145, 450, 200, 20, "", #SS_CENTERIMAGE)
TextGadget(#lived, 145, 500, 200, 20, "", #SS_CENTERIMAGE)
TextGadget(#diet, 145, 548, 202, 20, "", #SS_CENTERIMAGE)
TextGadget(#fossils, 145, 598, 200, 20, "", #SS_CENTERIMAGE)
EditorGadget(#FactFile, 375, 200, 480, 420, #PB_Editor_WordWrap)
;---[ Setup Search Box & Record Number Box ]---
StringGadget(#search, 985, 160, 150, 20, "", #SS_CENTERIMAGE) ;Search Box (At top right of screen)
StringGadget(#RecNo, 1036, 510, 70, 20, "", #SS_CENTERIMAGE) ; Get Record Box (above the Prev and Next buttons)
For colorGadgets = #name To #FactFile
SetGadgetColor(colorGadgets, #PB_Gadget_BackColor, RGB(255,255,255))
SetGadgetColor(colorGadgets, #PB_Gadget_FrontColor, RGB(0, 0, 0))
Next
margin = 10
SendMessage_(GadgetID(#Factfile), #EM_SETMARGINS, #EC_LEFTMARGIN, margin|0 << 16)
SendMessage_(GadgetID(#Factfile), #EM_SETMARGINS, #EC_RIGHTMARGIN, 0|margin << 16)
SetGadgetText(#Factfile, GetDatabaseString(#dbaseID, dbColumn))
SetActiveGadget(#Search)
;---{ Setup Buttons ]---
ButtonGadget(#getRecBtn, 1042, 540, 60, 20, "Get Record")
ButtonGadget(#prevBtn, 1000, 575, 60, 20, "Prev")
ButtonGadget(#nextBtn, 1090, 575, 60, 20, "Next")
ButtonGadget(#exitBtn, 1048, 610, 60, 20, "Exit")
Anyone see a problem that I am missing?